[alsa-devel] [PATCH] ALSA: hda: partially revert ALC268 quirk collapse
Takashi Iwai
tiwai at suse.de
Sun Aug 16 11:40:02 CEST 2009
At Sat, 15 Aug 2009 20:53:38 +0400,
Alexey Dobriyan wrote:
>
> On Sat, Aug 15, 2009 at 05:41:04PM +0200, Takashi Iwai wrote:
> > At Sat, 15 Aug 2009 16:38:46 +0400,
> > Alexey Dobriyan wrote:
> > >
> > > Fix alsamixer inability to start:
> > >
> > > ALSA lib simple_none.c:1491:(simple_add1) helem (MIXER,'Master Playback Switch',0,3,0) appears twice or more
> > >
> > > ALC268 codec shipped with Toshiba Satellite X200 has ids 1179:ff00 and
> > > began to match quirk table.
> > >
> > > If it doesn't match and auto-probe from BIOS is used, alsamixer works:
> > >
> > > hda_codec: Unknown model for ALC268, trying auto-probe from BIOS...
> > >
> > > 8871e5b91518a47284b6bc2603b44dbc79c85446 is first bad commit
> > > commit 8871e5b91518a47284b6bc2603b44dbc79c85446
> > > Author: Takashi Iwai <tiwai at suse.de>
> > > Date: Tue Jun 2 01:02:50 2009 +0200
> > >
> > > ALSA: hda - Reorder and clean-up ALC268 quirk table
> > >
> > > Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some
> > > entries using SND_PCI_QUIRK_MASK().
> > >
> > > Signed-off-by: Takashi Iwai <tiwai at suse.de>
> > >
> > > :040000 040000 2497bb6fc5305acf3191b8e9b82956ec0ea1aee9 6f1d9ff9fed20550a1b2b398c7d2d5fec705fcd9 M sound
> > >
> > > Signed-off-by: Alexey Dobriyan <adobriyan at gmail.com>
> >
> > Well, it's no right fix. The symptom implies that something wrong
> > with the current model=toshiba, so fixing the quirk is the way to go
> > at this moment.
> >
> > Could you give alsa-info.sh output (run with --no-upload option)
> > as vanilla kernel? Run with both model=auto and without model option
> > and attach both results to compare. The former means actually the
> > condition as your patch does.
>
> Here is diff for quick look:
Thanks. The problem is that this laptop has two ALC268 codecs, and
these conflict.
Could you try the patch below?
thanks,
Takashi
---
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index fea9767..6f683e4 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -12521,8 +12521,6 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = {
ALC268_TOSHIBA),
SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST),
SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO),
- SND_PCI_QUIRK_MASK(0x1179, 0xff00, 0xff00, "TOSHIBA A/Lx05",
- ALC268_TOSHIBA),
SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA),
SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER),
SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1),
@@ -12530,6 +12528,15 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = {
{}
};
+/* Toshiba laptops have no unique PCI SSID but only codec SSID */
+static struct snd_pci_quirk alc268_ssid_cfg_tbl[] = {
+ SND_PCI_QUIRK(0x1179, 0xff0a, "TOSHIBA X-200", ALC268_AUTO),
+ SND_PCI_QUIRK(0x1179, 0xff0e, "TOSHIBA X-200 HDMI", ALC268_AUTO),
+ SND_PCI_QUIRK_MASK(0x1179, 0xff00, 0xff00, "TOSHIBA A/Lx05",
+ ALC268_TOSHIBA),
+ {}
+};
+
static struct alc_config_preset alc268_presets[] = {
[ALC267_QUANTA_IL1] = {
.mixers = { alc267_quanta_il1_mixer, alc268_beep_mixer },
@@ -12696,6 +12703,10 @@ static int patch_alc268(struct hda_codec *codec)
alc268_models,
alc268_cfg_tbl);
+ if (board_config < 0 || board_config >= ALC268_MODEL_LAST)
+ board_config = snd_hda_check_board_codec_sid_config(codec,
+ ALC882_MODEL_LAST, alc268_models, alc268_ssid_cfg_tbl);
+
if (board_config < 0 || board_config >= ALC268_MODEL_LAST) {
printk(KERN_INFO "hda_codec: Unknown model for %s, "
"trying auto-probe from BIOS...\n", codec->chip_name);
More information about the Alsa-devel
mailing list