/[openvortex]/alsa/alsa-kernel/pci/ac97/ac97_codec.c
ViewVC logotype

Diff of /alsa/alsa-kernel/pci/ac97/ac97_codec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by vizard, Sat May 31 02:35:11 2003 UTC revision 1.3 by vizard, Sun Jun 15 21:01:31 2003 UTC
# Line 89  static const ac97_codec_id_t snd_ac97_co Line 89  static const ac97_codec_id_t snd_ac97_co
89  };  };
90    
91  static const ac97_codec_id_t snd_ac97_codec_ids[] = {  static const ac97_codec_id_t snd_ac97_codec_ids[] = {
 { 0x014b0502, 0xffffffff, "NM256AV",            NULL,           NULL }, // FIXME: which real one?  
92  { 0x414b4d00, 0xffffffff, "AK4540",             NULL,           NULL },  { 0x414b4d00, 0xffffffff, "AK4540",             NULL,           NULL },
93  { 0x414b4d01, 0xffffffff, "AK4542",             NULL,           NULL },  { 0x414b4d01, 0xffffffff, "AK4542",             NULL,           NULL },
94  { 0x414b4d02, 0xffffffff, "AK4543",             NULL,           NULL },  { 0x414b4d02, 0xffffffff, "AK4543",             NULL,           NULL },
# Line 104  static const ac97_codec_id_t snd_ac97_co Line 103  static const ac97_codec_id_t snd_ac97_co
103  { 0x41445363, 0xffffffff, "AD1886A",            patch_ad1881,   NULL },  { 0x41445363, 0xffffffff, "AD1886A",            patch_ad1881,   NULL },
104  { 0x41445370, 0xffffffff, "AD1980",             patch_ad1980,   NULL },  { 0x41445370, 0xffffffff, "AD1980",             patch_ad1980,   NULL },
105  { 0x41445372, 0xffffffff, "AD1981A",            patch_ad1881,   NULL },  { 0x41445372, 0xffffffff, "AD1981A",            patch_ad1881,   NULL },
106    { 0x41445374, 0xffffffff, "AD1981B",            patch_ad1881,   NULL },
107  { 0x41445375, 0xffffffff, "AD1985",             patch_ad1980,   NULL },  { 0x41445375, 0xffffffff, "AD1985",             patch_ad1980,   NULL },
108  { 0x414c4300, 0xfffffff0, "RL5306",             NULL,           NULL },  { 0x414c4300, 0xfffffff0, "RL5306",             NULL,           NULL },
109  { 0x414c4310, 0xfffffff0, "RL5382",             NULL,           NULL },  { 0x414c4310, 0xfffffff0, "RL5382",             NULL,           NULL },
# Line 113  static const ac97_codec_id_t snd_ac97_co Line 113  static const ac97_codec_id_t snd_ac97_co
113  { 0x414c4730, 0xffffffff, "ALC101",             NULL,           NULL },  { 0x414c4730, 0xffffffff, "ALC101",             NULL,           NULL },
114  { 0x414c4740, 0xfffffff0, "ALC202",             NULL,           NULL },  { 0x414c4740, 0xfffffff0, "ALC202",             NULL,           NULL },
115  { 0x414c4750, 0xfffffff0, "ALC250",             NULL,           NULL },  { 0x414c4750, 0xfffffff0, "ALC250",             NULL,           NULL },
116    { 0x414c4770, 0xfffffff0, "ALC203",             NULL,           NULL },
117  { 0x434d4941, 0xffffffff, "CMI9738",            NULL,           NULL },  { 0x434d4941, 0xffffffff, "CMI9738",            NULL,           NULL },
118  { 0x434d4961, 0xffffffff, "CMI9739",            patch_cm9739,   NULL },  { 0x434d4961, 0xffffffff, "CMI9739",            patch_cm9739,   NULL },
119  { 0x43525900, 0xfffffff8, "CS4297",             NULL,           NULL },  { 0x43525900, 0xfffffff8, "CS4297",             NULL,           NULL },
# Line 123  static const ac97_codec_id_t snd_ac97_co Line 124  static const ac97_codec_id_t snd_ac97_co
124  { 0x43525948, 0xfffffff8, "CS4201",             NULL,           NULL },  { 0x43525948, 0xfffffff8, "CS4201",             NULL,           NULL },
125  { 0x43525958, 0xfffffff8, "CS4205",             patch_cirrus_spdif,     NULL },  { 0x43525958, 0xfffffff8, "CS4205",             patch_cirrus_spdif,     NULL },
126  { 0x43525960, 0xfffffff8, "CS4291",             NULL,           NULL },  { 0x43525960, 0xfffffff8, "CS4291",             NULL,           NULL },
127    { 0x43525970, 0xfffffff8, "CS4202",             NULL,           NULL },
128  { 0x43585421, 0xffffffff, "HSD11246",           NULL,           NULL }, // SmartMC II  { 0x43585421, 0xffffffff, "HSD11246",           NULL,           NULL }, // SmartMC II
129  { 0x43585428, 0xfffffff8, "Cx20468",            patch_conexant, NULL }, // SmartAMC fixme: the mask might be different  { 0x43585428, 0xfffffff8, "Cx20468",            patch_conexant, NULL }, // SmartAMC fixme: the mask might be different
130  { 0x44543031, 0xfffffff0, "DT0398",             NULL,           NULL },  { 0x44543031, 0xfffffff0, "DT0398",             NULL,           NULL },
# Line 131  static const ac97_codec_id_t snd_ac97_co Line 133  static const ac97_codec_id_t snd_ac97_co
133  { 0x48525300, 0xffffff00, "HMP9701",            NULL,           NULL },  { 0x48525300, 0xffffff00, "HMP9701",            NULL,           NULL },
134  { 0x49434501, 0xffffffff, "ICE1230",            NULL,           NULL },  { 0x49434501, 0xffffffff, "ICE1230",            NULL,           NULL },
135  { 0x49434511, 0xffffffff, "ICE1232",            NULL,           NULL }, // alias VIA VT1611A?  { 0x49434511, 0xffffffff, "ICE1232",            NULL,           NULL }, // alias VIA VT1611A?
136    { 0x49434514, 0xffffffff, "ICE1232A",           NULL,           NULL },
137  { 0x49434551, 0xffffffff, "VT1616",             NULL,           NULL },  { 0x49434551, 0xffffffff, "VT1616",             NULL,           NULL },
138    { 0x49434552, 0xffffffff, "VT1616i",            NULL,           NULL }, // VT1616 compatible (chipset integrated)
139  { 0x49544520, 0xffffffff, "IT2226E",            NULL,           NULL },  { 0x49544520, 0xffffffff, "IT2226E",            NULL,           NULL },
140  { 0x4e534300, 0xffffffff, "LM4540/43/45/46/48", NULL,           NULL }, // only guess --jk  { 0x4e534300, 0xffffffff, "LM4540/43/45/46/48", NULL,           NULL }, // only guess --jk
141  { 0x4e534331, 0xffffffff, "LM4549",             NULL,           NULL },  { 0x4e534331, 0xffffffff, "LM4549",             NULL,           NULL },
142    { 0x4e534350, 0xffffffff, "LM4550",             NULL,           NULL },
143  { 0x50534304, 0xffffffff, "UCB1400",            NULL,           NULL },  { 0x50534304, 0xffffffff, "UCB1400",            NULL,           NULL },
144  { 0x53494c20, 0xffffffe0, "Si3036/8",           NULL,           NULL },  { 0x53494c20, 0xffffffe0, "Si3036/8",           NULL,           NULL },
145  { 0x54524102, 0xffffffff, "TR28022",            NULL,           NULL },  { 0x54524102, 0xffffffff, "TR28022",            NULL,           NULL },
# Line 160  static const ac97_codec_id_t snd_ac97_co Line 165  static const ac97_codec_id_t snd_ac97_co
165  { 0x83847609, 0xffffffff, "STAC9721/23",        patch_sigmatel_stac9721,        NULL },  { 0x83847609, 0xffffffff, "STAC9721/23",        patch_sigmatel_stac9721,        NULL },
166  { 0x83847644, 0xffffffff, "STAC9744",           patch_sigmatel_stac9744,        NULL },  { 0x83847644, 0xffffffff, "STAC9744",           patch_sigmatel_stac9744,        NULL },
167  { 0x83847650, 0xffffffff, "STAC9750/51",        NULL,           NULL }, // patch?  { 0x83847650, 0xffffffff, "STAC9750/51",        NULL,           NULL }, // patch?
168    { 0x83847652, 0xffffffff, "STAC9752/53",        NULL,           NULL }, // patch?
169  { 0x83847656, 0xffffffff, "STAC9756/57",        patch_sigmatel_stac9756,        NULL },  { 0x83847656, 0xffffffff, "STAC9756/57",        patch_sigmatel_stac9756,        NULL },
170  { 0x83847666, 0xffffffff, "STAC9766/67",        NULL,           NULL }, // patch?  { 0x83847666, 0xffffffff, "STAC9766/67",        NULL,           NULL }, // patch?
171  { 0,          0,          NULL,                 NULL,           NULL }  { 0,          0,          NULL,                 NULL,           NULL }
# Line 184  static const char *snd_ac97_stereo_enhan Line 190  static const char *snd_ac97_stereo_enhan
190    /*  14 */ "Binaura 3D Audio Enhancement",    /*  14 */ "Binaura 3D Audio Enhancement",
191    /*  15 */ "ESS Technology Stereo Enhancement",    /*  15 */ "ESS Technology Stereo Enhancement",
192    /*  16 */ "Harman International VMAx",    /*  16 */ "Harman International VMAx",
193    /*  17 */ "Nvidea 3D Stereo Enhancement",    /*  17 */ "Nvidea/IC Ensemble/KS Waves 3D Stereo Enhancement",
194    /*  18 */ "Philips Incredible Sound",    /*  18 */ "Philips Incredible Sound",
195    /*  19 */ "Texas Instruments 3D Stereo Enhancement",    /*  19 */ "Texas Instruments 3D Stereo Enhancement",
196    /*  20 */ "VLSI Technology 3D Stereo Enhancement",    /*  20 */ "VLSI Technology 3D Stereo Enhancement",
# Line 2068  int snd_ac97_mixer(snd_card_t * card, ac Line 2074  int snd_ac97_mixer(snd_card_t * card, ac
2074          snd_assert(rac97 != NULL, return -EINVAL);          snd_assert(rac97 != NULL, return -EINVAL);
2075          *rac97 = NULL;          *rac97 = NULL;
2076          snd_assert(card != NULL && _ac97 != NULL, return -EINVAL);          snd_assert(card != NULL && _ac97 != NULL, return -EINVAL);
2077          ac97 = snd_magic_kcalloc(ac97_t, 0, GFP_KERNEL);          ac97 = snd_magic_kmalloc(ac97_t, 0, GFP_KERNEL);
2078          if (ac97 == NULL)          if (ac97 == NULL)
2079                  return -ENOMEM;                  return -ENOMEM;
2080          *ac97 = *_ac97;          *ac97 = *_ac97;
# Line 2102  int snd_ac97_mixer(snd_card_t * card, ac Line 2108  int snd_ac97_mixer(snd_card_t * card, ac
2108          }          }
2109                    
2110          /* test for AC'97 */          /* test for AC'97 */
2111          /* test if we can write to the record gain volume register */          if (! (ac97->scaps & AC97_SCAP_AUDIO)) {
2112          snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06);                  /* test if we can write to the record gain volume register */
2113          if ((err = snd_ac97_read(ac97, AC97_REC_GAIN)) == 0x8a06) {                  snd_ac97_write_cache(ac97, AC97_REC_GAIN, 0x8a06);
2114                  ac97->scaps |= AC97_SCAP_AUDIO;                  if ((err = snd_ac97_read(ac97, AC97_REC_GAIN)) == 0x8a06)
2115                            ac97->scaps |= AC97_SCAP_AUDIO;
2116            }
2117            if (ac97->scaps & AC97_SCAP_AUDIO) {
2118                  ac97->caps = snd_ac97_read(ac97, AC97_RESET);                  ac97->caps = snd_ac97_read(ac97, AC97_RESET);
2119                  ac97->ext_id = snd_ac97_read(ac97, AC97_EXTENDED_ID);                  ac97->ext_id = snd_ac97_read(ac97, AC97_EXTENDED_ID);
2120                  if (ac97->ext_id == 0xffff)     /* invalid combination */                  if (ac97->ext_id == 0xffff)     /* invalid combination */

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26