Skip to contentSkip to conversation

ALSA: hda: partially revert ALC268 quirk collapse

PATCH Takashi Iwai 2 participants 4 messages Aug 15, 2009 – Aug 19, 2009 2 messages not in the archive Sound

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

At Sat, 15 Aug 2009 16:38:46 +0400,

Quoted 19 lines · Alexey Dobriyan

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 <[email protected]>
Date:   Tue Jun 2 01:02:50 2009 +0200

ALSA: hda - Reorder and clean-up ALC268 quirk table

Quoted 8 lines

Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some entries using SND_PCI_QUIRK_MASK().

:040000 040000 2497bb6fc5305acf3191b8e9b82956ec0ea1aee9 6f1d9ff9fed20550a1b2b398c7d2d5fec705fcd9 M sound

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.

thanks,

Takashi

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

At Sat, 15 Aug 2009 20:53:38 +0400,

Quoted 36 lines · Alexey Dobriyan
Quoted 34 lines · Takashi Iwai

At Sat, 15 Aug 2009 16:38:46 +0400,

Quoted 19 lines · Alexey Dobriyan

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 <[email protected]>
Date:   Tue Jun 2 01:02:50 2009 +0200

ALSA: hda - Reorder and clean-up ALC268 quirk table

Quoted 8 lines

Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some entries using SND_PCI_QUIRK_MASK().

:040000 040000 2497bb6fc5305acf3191b8e9b82956ec0ea1aee9 6f1d9ff9fed20550a1b2b398c7d2d5fec705fcd9 M sound

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.

Quoted 6 lines
Quoted 4 lines

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

---

sound/pci/hda/patch_realtek.c +13 -2
index fea9767..6f683e4 100644
@@ -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);
Tested-by
#4 lore raw
Quoted 43 lines · Takashi Iwai

At Sat, 15 Aug 2009 20:53:38 +0400,

Quoted 41 lines · Alexey Dobriyan
Quoted 38 lines · Takashi Iwai

At Sat, 15 Aug 2009 16:38:46 +0400,

Quoted 19 lines · Alexey Dobriyan

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 <[email protected]>
Date:   Tue Jun 2 01:02:50 2009 +0200

ALSA: hda - Reorder and clean-up ALC268 quirk table

Quoted 8 lines

Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some entries using SND_PCI_QUIRK_MASK().

:040000 040000 2497bb6fc5305acf3191b8e9b82956ec0ea1aee9 6f1d9ff9fed20550a1b2b398c7d2d5fec705fcd9 M sound

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.

Quoted 6 lines
Quoted 1 line

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?

It helps, thank you.

#5 lore raw

At Wed, 19 Aug 2009 21:51:59 +0400,

Quoted 47 lines · Alexey Dobriyan
Quoted 45 lines · Takashi Iwai

At Sat, 15 Aug 2009 20:53:38 +0400,

Quoted 42 lines · Alexey Dobriyan
Quoted 30 lines · Takashi Iwai

At Sat, 15 Aug 2009 16:38:46 +0400,

Quoted 19 lines · Alexey Dobriyan

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 <[email protected]>
Date:   Tue Jun 2 01:02:50 2009 +0200

ALSA: hda - Reorder and clean-up ALC268 quirk table

Quoted 8 lines

Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some entries using SND_PCI_QUIRK_MASK().

:040000 040000 2497bb6fc5305acf3191b8e9b82956ec0ea1aee9 6f1d9ff9fed20550a1b2b398c7d2d5fec705fcd9 M sound

Quoted 8 lines

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:

Quoted 8 lines
Quoted 4 lines

Thanks. The problem is that this laptop has two ALC268 codecs, and these conflict.

Could you try the patch below?

It helps, thank you.

Thanks for checking. I merged the patch now. It'll be included in the next pull request.

Takashi