hda-codec.c (8ca2838de2d0c5e5166549e5d15448433efaf348) | hda-codec.c (85bc58520c0e43660cbbe51b9eb5022a0baafe9f) |
---|---|
1/* 2 * Copyright (C) 2010 Red Hat, Inc. 3 * 4 * written by Gerd Hoffmann <kraxel@redhat.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 or --- 85 unchanged lines hidden (view full) --- 94 case 3: as->freq /= 4; break; 95 case 4: as->freq /= 5; break; 96 case 5: as->freq /= 6; break; 97 case 6: as->freq /= 7; break; 98 case 7: as->freq /= 8; break; 99 } 100 101 switch (format & AC_FMT_BITS_MASK) { | 1/* 2 * Copyright (C) 2010 Red Hat, Inc. 3 * 4 * written by Gerd Hoffmann <kraxel@redhat.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 or --- 85 unchanged lines hidden (view full) --- 94 case 3: as->freq /= 4; break; 95 case 4: as->freq /= 5; break; 96 case 5: as->freq /= 6; break; 97 case 6: as->freq /= 7; break; 98 case 7: as->freq /= 8; break; 99 } 100 101 switch (format & AC_FMT_BITS_MASK) { |
102 case AC_FMT_BITS_8: as->fmt = AUD_FMT_S8; break; 103 case AC_FMT_BITS_16: as->fmt = AUD_FMT_S16; break; 104 case AC_FMT_BITS_32: as->fmt = AUD_FMT_S32; break; | 102 case AC_FMT_BITS_8: as->fmt = AUDIO_FORMAT_S8; break; 103 case AC_FMT_BITS_16: as->fmt = AUDIO_FORMAT_S16; break; 104 case AC_FMT_BITS_32: as->fmt = AUDIO_FORMAT_S32; break; |
105 } 106 107 as->nchannels = ((format & AC_FMT_CHAN_MASK) >> AC_FMT_CHAN_SHIFT) + 1; 108} 109 110/* -------------------------------------------------------------------------- */ 111/* 112 * HDA codec descriptions --- 16 unchanged lines hidden (view full) --- 129 130#define HDA_TIMER_TICKS (SCALE_MS) 131#define B_SIZE sizeof(st->buf) 132#define B_MASK (sizeof(st->buf) - 1) 133 134/* -------------------------------------------------------------------------- */ 135 136static const char *fmt2name[] = { | 105 } 106 107 as->nchannels = ((format & AC_FMT_CHAN_MASK) >> AC_FMT_CHAN_SHIFT) + 1; 108} 109 110/* -------------------------------------------------------------------------- */ 111/* 112 * HDA codec descriptions --- 16 unchanged lines hidden (view full) --- 129 130#define HDA_TIMER_TICKS (SCALE_MS) 131#define B_SIZE sizeof(st->buf) 132#define B_MASK (sizeof(st->buf) - 1) 133 134/* -------------------------------------------------------------------------- */ 135 136static const char *fmt2name[] = { |
137 [ AUD_FMT_U8 ] = "PCM-U8", 138 [ AUD_FMT_S8 ] = "PCM-S8", 139 [ AUD_FMT_U16 ] = "PCM-U16", 140 [ AUD_FMT_S16 ] = "PCM-S16", 141 [ AUD_FMT_U32 ] = "PCM-U32", 142 [ AUD_FMT_S32 ] = "PCM-S32", | 137 [ AUDIO_FORMAT_U8 ] = "PCM-U8", 138 [ AUDIO_FORMAT_S8 ] = "PCM-S8", 139 [ AUDIO_FORMAT_U16 ] = "PCM-U16", 140 [ AUDIO_FORMAT_S16 ] = "PCM-S16", 141 [ AUDIO_FORMAT_U32 ] = "PCM-U32", 142 [ AUDIO_FORMAT_S32 ] = "PCM-S32", |
143}; 144 145typedef struct HDAAudioState HDAAudioState; 146typedef struct HDAAudioStream HDAAudioStream; 147 148struct HDAAudioStream { 149 HDAAudioState *state; 150 const desc_node *node; --- 808 unchanged lines hidden --- | 143}; 144 145typedef struct HDAAudioState HDAAudioState; 146typedef struct HDAAudioStream HDAAudioStream; 147 148struct HDAAudioStream { 149 HDAAudioState *state; 150 const desc_node *node; --- 808 unchanged lines hidden --- |