Re: [alsa-devel] VGN-P11Z_G (hda-intel ALC262) internal microphone not working
Hi, Takashi,
On Wed, Jan 13, 2010 at 12:28 PM, Christian Stöveken christian.stoeveken@gmail.com wrote:
sorry to get back to you so late - I tried again 5 minutes ago and it is now working with the false parameter removed (/etc/modules:9: snd-hda-intel model=vaio)
working "model=auto": http://www.alsa-project.org/db/?f=67f6a692f0ccd70d6893665d36c8b90a51f4a577
also with "power_save=10 power_save_controller=N model=auto": http://www.alsa-project.org/db/?f=618f4d4ae530957b4b6d2b66751871d4073df685
I hope this is how you expected it to look like. Also the headphones now work correctly.
Attached is a patch against current sound-2.6 master HEAD that:
* adds Christian's SSID to the relevant quirk table, * prefers BIOS autoprobing for existing Sony VAIO models matching 0x104d90xx.
The second change was made to ease backing out the change in case of regressions.
Best, -Dan
At Wed, 13 Jan 2010 19:41:12 -0500, Daniel Chen wrote:
From 1372724cfb24d342c60d94cd18101164208b0044 Mon Sep 17 00:00:00 2001 From: Daniel T Chen crimsun@ubuntu.com Date: Wed, 13 Jan 2010 19:25:37 -0500 Subject: [PATCH] ALSA: hda: Default to BIOS autoprobe for existing 0x104d90xx entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Christian reported[0] that his laptop does not have audible capture by default. Debugging the symptom revealed that his model needs the auto quirk, so add his SSID to alc262_cfg_tbl[].
Isn't this with the older driver version before disabling the default quirk to sony-assamd model? In the recent version, it would fall back to auto model.
Having an entry to ALC262_AUTO is fine. It even reduces a kernel message that may wonder user. So here what we have to check lastly is whether VAIO Z21MN (104d:9025) that is currently with toshiba-s06 works with model=auto or not. Once after it's confirmed, we can take all to auto.
thanks,
Takashi
Since we've accumulated several 0x104d90xx entries in the above quirk table that correspond to the model=auto quirk, just disable them and trust the BIOSes do the right thing.
[0] http://mailman.alsa-project.org/pipermail/alsa-devel/2010-January/024327.htm...
Tested-by: Christian Stöveken christian.stoeveken@gmail.com Signed-off-by: Daniel T Chen crimsun@ubuntu.com
sound/pci/hda/patch_realtek.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index de1c5fd..8356b9f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -11750,11 +11750,12 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { SND_PCI_QUIRK(0x104d, 0x1f00, "Sony ASSAMD", ALC262_SONY_ASSAMD), SND_PCI_QUIRK(0x104d, 0x8203, "Sony UX-90", ALC262_HIPPO), SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD), +#if 0 /* disable the quirk since model=auto works better in recent versions */ SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), SND_PCI_QUIRK(0x104d, 0x9035, "Sony VAIO VGN-FW170J", ALC262_AUTO),
- SND_PCI_QUIRK(0x104d, 0x9039, "Sony VAIO VGN-P11Z_G", ALC262_AUTO), SND_PCI_QUIRK(0x104d, 0x9047, "Sony VAIO Type G", ALC262_AUTO),
-#if 0 /* disable the quirk since model=auto works better in recent versions */ SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", ALC262_SONY_ASSAMD),
#endif
1.6.5
At Thu, 14 Jan 2010 07:52:16 +0100, I wrote:
At Wed, 13 Jan 2010 19:41:12 -0500, Daniel Chen wrote:
From 1372724cfb24d342c60d94cd18101164208b0044 Mon Sep 17 00:00:00 2001 From: Daniel T Chen crimsun@ubuntu.com Date: Wed, 13 Jan 2010 19:25:37 -0500 Subject: [PATCH] ALSA: hda: Default to BIOS autoprobe for existing 0x104d90xx entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Christian reported[0] that his laptop does not have audible capture by default. Debugging the symptom revealed that his model needs the auto quirk, so add his SSID to alc262_cfg_tbl[].
Isn't this with the older driver version before disabling the default quirk to sony-assamd model? In the recent version, it would fall back to auto model.
Christian, did you really try *without* model option with the recent version, either alsa-driver-1.0.22.1 or the recent vanilla 2.6.33-rc kernel? You seem to have passed model=vaio, as far as I see in the thread.
thanks,
Takashi
On Thu, Jan 14, 2010 at 1:52 AM, Takashi Iwai tiwai@suse.de wrote:
Isn't this with the older driver version before disabling the default quirk to sony-assamd model? In the recent version, it would fall back to auto model.
Indeed, both of his alsa-info.sh outputs show that he used model=auto with -driver 1.0.20:
working "model=auto": http://www.alsa-project.org/db/?f=67f6a692f0ccd70d6893665d36c8b90a51f4a577
also with "power_save=10 power_save_controller=N model=auto": http://www.alsa-project.org/db/?f=618f4d4ae530957b4b6d2b66751871d4073df685
Having an entry to ALC262_AUTO is fine. It even reduces a kernel message that may wonder user. So here what we have to check lastly is whether VAIO Z21MN (104d:9025) that is currently with toshiba-s06 works with model=auto or not. Once after it's confirmed, we can take all to auto.
Because I don't have access to 0x104d9025 and I don't wish to introduce a further regression for that model, I've just respun the patch against current master HEAD adding his SSID with the model=auto quirk.
Best, -Dan
At Thu, 14 Jan 2010 07:03:20 -0500, Daniel Chen wrote:
On Thu, Jan 14, 2010 at 1:52 AM, Takashi Iwai tiwai@suse.de wrote:
Isn't this with the older driver version before disabling the default quirk to sony-assamd model? In the recent version, it would fall back to auto model.
Indeed, both of his alsa-info.sh outputs show that he used model=auto with -driver 1.0.20:
working "model=auto": http://www.alsa-project.org/db/?f=67f6a692f0ccd70d6893665d36c8b90a51f4a577
also with "power_save=10 power_save_controller=N model=auto": http://www.alsa-project.org/db/?f=618f4d4ae530957b4b6d2b66751871d4073df685
Having an entry to ALC262_AUTO is fine. It even reduces a kernel message that may wonder user. So here what we have to check lastly is whether VAIO Z21MN (104d:9025) that is currently with toshiba-s06 works with model=auto or not. Once after it's confirmed, we can take all to auto.
Because I don't have access to 0x104d9025 and I don't wish to introduce a further regression for that model, I've just respun the patch against current master HEAD adding his SSID with the model=auto quirk.
Well, I guess the latest driver should work even without quirk because model=auto would be chosen as default. In the older verison, model=sony-assamd was chosen for Sony laptops, but it's disabled now.
If my guess is right, I'd apply a clean-up patch for 2.6.34, but no need for a new addition of model=auto quirk entry for 2.6.33. If not, please let me know.
thanks,
Takashi
Sorry, I din't know I should test without model=auto.
http://www.alsa-project.org/db/?f=87e1ba4b02f13689fb0d32a03b45fd79ebf57ef0 that's with "options snd-hda-intel power_save=10 power_save_controller=N" on 2.6.33-020633rc4-generic ... no microphone also no mic with "options snd-hda-intel power_save=10 power_save_controller=N model=auto" on that kernel http://www.alsa-project.org/db/?f=388a56455f5bd65da53f24b5f09f240082417d16
on 2.6.31-18 with "options snd-hda-intel power_save=10 power_save_controller=N model=auto" http://www.alsa-project.org/db/?f=d346b2e78e86a1d05314c053a3b3068d9cf9b1d3 *the microphone is working* also without model=auto *it isn't* http://www.alsa-project.org/db/?f=094606e931c0e6e684a36e8c83145c45efa82719
Driver version: 1.0.21
Library version: 1.0.22
Utilities version: 1.0.22
used the the script from here: http://ubuntuforums.org/showthread.php?p=6589810 to update.
Regards, Christian
On Thu, Jan 14, 2010 at 3:14 PM, Takashi Iwai tiwai@suse.de wrote:
At Thu, 14 Jan 2010 07:03:20 -0500, Daniel Chen wrote:
On Thu, Jan 14, 2010 at 1:52 AM, Takashi Iwai tiwai@suse.de wrote:
Isn't this with the older driver version before disabling the default quirk to sony-assamd model? In the recent version, it would fall back to auto model.
Indeed, both of his alsa-info.sh outputs show that he used model=auto with -driver 1.0.20:
working "model=auto":
http://www.alsa-project.org/db/?f=67f6a692f0ccd70d6893665d36c8b90a51f4a577
also with "power_save=10 power_save_controller=N model=auto":
http://www.alsa-project.org/db/?f=618f4d4ae530957b4b6d2b66751871d4073df685
Having an entry to ALC262_AUTO is fine. It even reduces a kernel message that may wonder user. So here what we have to check lastly is whether VAIO Z21MN (104d:9025) that is currently with toshiba-s06 works with model=auto or not. Once after it's confirmed, we can take all to auto.
Because I don't have access to 0x104d9025 and I don't wish to introduce a further regression for that model, I've just respun the patch against current master HEAD adding his SSID with the model=auto quirk.
Well, I guess the latest driver should work even without quirk because model=auto would be chosen as default. In the older verison, model=sony-assamd was chosen for Sony laptops, but it's disabled now.
If my guess is right, I'd apply a clean-up patch for 2.6.34, but no need for a new addition of model=auto quirk entry for 2.6.33. If not, please let me know.
thanks,
Takashi
At Fri, 15 Jan 2010 00:30:41 +0100, Christian Stöveken wrote:
http://www.alsa-project.org/db/?f=87e1ba4b02f13689fb0d32a03b45fd79ebf57ef0 that's with "options snd-hda-intel power_save=10 power_save_controller=N" on 2.6.33-020633rc4-generic ... no microphone also no mic with "options snd-hda-intel power_save=10 power_save_controller=N model=auto" on that kernel http://www.alsa-project.org/db/?f=388a56455f5bd65da53f24b5f09f240082417d16
OK, then this is a bug to fix. Does the patch below work (for 2.6.33)?
Also, which mic are you testing? The built-in mic or the mic jack? It seems that BIOS sets only one pin for the mic. I don't know whether this is correct, i.e. the hardware switches the input automatically by itself and shares the same pin. If not, it's a BIOS bug that offers only one input pin.
thanks,
Takashi
--- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 301b147..a8b4f6b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1234,6 +1234,8 @@ static void alc_init_auto_mic(struct hda_codec *codec) return; /* invalid entry */ } } + if (!ext || !fixed) + return; if (!(get_wcaps(codec, ext) & AC_WCAP_UNSOL_CAP)) return; /* no unsol support */ snd_printdd("realtek: Enable auto-mic switch on NID 0x%x/0x%x\n", @@ -4917,6 +4919,48 @@ static void fixup_automic_adc(struct hda_codec *codec) spec->auto_mic = 0; /* disable auto-mic to be sure */ }
+/* choose the ADC/MUX containing the input pin and initialize the setup */ +static void fixup_single_adc(struct hda_codec *codec) +{ + struct alc_spec *spec = codec->spec; + hda_nid_t pin; + int i; + + /* there must be only two mic inputs exclusively */ + for (i = 0; i < AUTO_PIN_LAST; i++) { + if (spec->autocfg.input_pins[i]) { + pin = spec->autocfg.input_pins[i]; + break; + } + } + if (!pin) + return; + + for (i = 0; i < spec->num_adc_nids; i++) { + hda_nid_t cap = spec->capsrc_nids ? + spec->capsrc_nids[i] : spec->adc_nids[i]; + int idx; + + idx = get_connection_index(codec, cap, pin); + if (idx < 0) + continue; + spec->int_mic.mux_idx = idx; + if (spec->capsrc_nids) + spec->capsrc_nids += i; + spec->adc_nids += i; + spec->num_adc_nids = 1; + /* select or unmute this route */ + if (get_wcaps_type(get_wcaps(codec, cap)) == AC_WID_AUD_MIX) { + snd_hda_codec_amp_stereo(codec, cap, HDA_INPUT, idx, + HDA_AMP_MUTE, 0); + } else { + snd_hda_codec_write_cache(codec, cap, 0, + AC_VERB_SET_CONNECT_SEL, idx); + } + return; + } +} + static void set_capture_mixer(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; @@ -4929,14 +4973,15 @@ static void set_capture_mixer(struct hda_codec *codec) alc_capture_mixer3 }, }; if (spec->num_adc_nids > 0 && spec->num_adc_nids <= 3) { - int mux; - if (spec->auto_mic) { - mux = 0; + int mux = 0; + if (spec->auto_mic) fixup_automic_adc(codec); - } else if (spec->input_mux && spec->input_mux->num_items > 1) - mux = 1; - else - mux = 0; + else if (spec->input_mux) { + if (spec->input_mux->num_items > 1) + mux = 1; + if (spec->input_mux->num_items == 1) + fixup_single_adc(codec); + } spec->cap_mixer = caps[mux][spec->num_adc_nids - 1]; } } @@ -11334,7 +11379,7 @@ static int alc262_auto_create_multi_out_ctls(struct alc_spec *spec, }
#define alc262_auto_create_input_ctls \ - alc880_auto_create_input_ctls + alc882_auto_create_input_ctls
/* * generic initialization of ADC, input mixers and output mixers
participants (3)
-
Christian Stöveken
-
Daniel Chen
-
Takashi Iwai