Commit 8e8311b0 authored by Sasha Khapyorsky's avatar Sasha Khapyorsky Committed by Jaroslav Kysela

[ALSA] Fix MC97 codec initialization

AC97 Codec
This (especially 12000 -> 8000 sample rate replace) fix popular
'MC97 converters.. not ready' error with modem codecs initializations.
Signed-off-by: default avatarSasha Khapyorsky <sashak@smlink.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2c56c47f
...@@ -1964,21 +1964,21 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97) ...@@ -1964,21 +1964,21 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
/* note: it's important to set the rate at first */ /* note: it's important to set the rate at first */
tmp = AC97_MEA_GPIO; tmp = AC97_MEA_GPIO;
if (ac97->ext_mid & AC97_MEI_LINE1) { if (ac97->ext_mid & AC97_MEI_LINE1) {
snd_ac97_write_cache(ac97, AC97_LINE1_RATE, 12000); snd_ac97_write_cache(ac97, AC97_LINE1_RATE, 8000);
tmp |= AC97_MEA_ADC1 | AC97_MEA_DAC1; tmp |= AC97_MEA_ADC1 | AC97_MEA_DAC1;
} }
if (ac97->ext_mid & AC97_MEI_LINE2) { if (ac97->ext_mid & AC97_MEI_LINE2) {
snd_ac97_write_cache(ac97, AC97_LINE2_RATE, 12000); snd_ac97_write_cache(ac97, AC97_LINE2_RATE, 8000);
tmp |= AC97_MEA_ADC2 | AC97_MEA_DAC2; tmp |= AC97_MEA_ADC2 | AC97_MEA_DAC2;
} }
if (ac97->ext_mid & AC97_MEI_HANDSET) { if (ac97->ext_mid & AC97_MEI_HANDSET) {
snd_ac97_write_cache(ac97, AC97_HANDSET_RATE, 12000); snd_ac97_write_cache(ac97, AC97_HANDSET_RATE, 8000);
tmp |= AC97_MEA_HADC | AC97_MEA_HDAC; tmp |= AC97_MEA_HADC | AC97_MEA_HDAC;
} }
snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0xff00 & ~(tmp << 8)); snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0);
udelay(100); udelay(100);
/* nothing should be in powerdown mode */ /* nothing should be in powerdown mode */
snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0xff00 & ~(tmp << 8)); snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0);
end_time = jiffies + (HZ / 10); end_time = jiffies + (HZ / 10);
do { do {
if ((snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS) & tmp) == tmp) if ((snd_ac97_read(ac97, AC97_EXTENDED_MSTATUS) & tmp) == tmp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment