2.6.28-rc5 broke ALSA headphone output for my Toughbooks.
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Tue, 23 Dec 2008 10:44:50 -0500,
Quoted 7 lines · Kyler Laird
My Panasonic CF-74 Toughbooks do not play audio through the headphone jack starting with 2.6.28-rc5. The patch below is only to illustrate what changes I made to restore headphone jack functionality. I do not suggest using this patch as part of the mainline kernel because it reverts some code that I'm sure is important to other users.
Quoted 6 lines
Output of the ALSA script aadebug follows the patch.
I'm continuing to investigate but I wanted to get this out in case the solution is obvious to someone else. It would be great to have a fix in 2.6.28. (2.6.28 is the first series to support all of the hardware in the Toughbook.)
Please run alsa-info.sh with --no-upload option and attach the generated files on both the headphone plugged and unplugged. Also, run preferably on both (old) working and non-working kernels to compare.
thanks,
Takashi
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
sorry for the late reply, as I lately got back from vacation.
At Thu, 1 Jan 2009 09:57:30 -0500,
Quoted 10 lines · Kyler Laird
Quoted 4 lines · Takashi Iwai
Please run
alsa-info.shwith --no-upload option and attach the generated files on both the headphone plugged and unplugged. Also, run preferably on both (old) working and non-working kernels to compare.There appears to be no difference in output between headphones plugged and unplugged.
Thanks. So, it implies that the device actually doesn't need the headphone detection but rather does on hardware by itself.
How about the patch below?
It's against the latest git but should work with 2.6.28, too.
Takashi
---
sound/pci/hda/patch_sigmatel.c +3 -0
@@ -4408,6 +4408,9 @@ static int patch_stac9200(struct hda_codec *codec)return err; } +if (spec->board_config ==STAC_9200_PANASONIC ) + spec->hp_detect =0 ; + codec->patch_ops = stac92xx_patch_ops;return 0 ;
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Thu, 8 Jan 2009 12:10:27 -0500,
Quoted 18 lines · Kyler Laird
Quoted 8 lines · Takashi Iwai
Quoted 2 lines
There appears to be no difference in output between headphones plugged and unplugged.
Thanks. So, it implies that the device actually doesn't need the headphone detection but rather does on hardware by itself.
How about the patch below?
It's against the latest git but should work with 2.6.28, too.The patch applied alright but did not seem to help. I applied my patch on top of it and it did work again. That surprised me. It seems that your patch just disables
hp_detectbut apparentlySTAC_HP_EVENTis still being received bystac92xx_unsol_event()and that's callingstac92xx_hp_detect().
Quoted 7 lines
I added a
printk()tostac92xx_unsol_event()and see that it's called only once, right as the module is loaded (res=3221225472). It is not called again when I plug or unplug the headphones.I agree that there does not seem to be headphone detection but it does seem that another audio pathway needs to be enabled in order for the headphones to work.
Could you add dump_stack() in stac92xx_unsol_event() and check the code path?
You are using 2.6.28, not the latest git tree, right?
thanks,
Takashi
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Thu, 8 Jan 2009 13:22:41 -0500,
Quoted 6 lines · Kyler Laird
Quoted 2 lines · Takashi Iwai
Could you add
dump_stack()instac92xx_unsol_event()and check the code path?
Quoted 9 lines
Jan 8 13:19:12 ruff kernel: HDA Intel 0000:00:1b.0: PCI INT A disabled Jan 8 13:19:12 ruff kernel: HDA Intel 0000:00:1b.0: power state changed by ACPI to D0 Jan 8 13:19:12 ruff kernel: HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22 Jan 8 13:19:12 ruff kernel: HDA Intel 0000:00:1b.0: setting latency timer to 64 Jan 8 13:19:12 ruff kernel: (Kyler) stac92xx_unsol_event: 3221225472 Jan 8 13:19:12 ruff kernel: Pid: 13602, comm: modprobe Not tainted 2.6.28 #1 Jan 8 13:19:12 ruff kernel: Call Trace: Jan 8 13:19:12 ruff kernel: [<e0a30af3>] stac92xx_unsol_event+0x33/0x380 [snd_hda_intel] Jan 8 13:19:12 ruff kernel: [<e0a303b0>] stac92xx_init+0x120/0x490 [snd_hda_intel]
Weird. I thought this path is active only when hp_detect != 0. Could you check whether it's really correctly patched, e.g. by the patch like below?
It seems applying my previous patch on 2.6.28 puts the code into a wrong place.
Takashi
---
sound/pci/hda/patch_sigmatel.c +6 -0
@@ -3745,6 +3745,7 @@ static int stac92xx_init(struct hda_codec *codec)/* set up pins */ if (spec->hp_detect) { +printk (KERN_DEBUG "XXX stac92xx_init -- hp_detect is ON!\n" );/* Enable unsolicited responses on the HP widget */ for (i =0 ; i < cfg->hp_outs; i++) enable_pin_detect(codec, cfg->hp_pins[i],
@@ -4129,6 +4130,11 @@ static int patch_stac9200(struct hda_codec *codec)return err; } +if (spec->board_config ==STAC_9200_PANASONIC ) { +printk (KERN_DEBUG "XXX panasonic quirk enabled\n" ); + spec->hp_detect =0 ; + } + codec->patch_ops = stac92xx_patch_ops;return 0 ;
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Fri, 9 Jan 2009 10:21:21 -0500,
Quoted 7 lines · Kyler Laird
Quoted 3 lines · Takashi Iwai
Weird. I thought this path is active only when
hp_detect!= 0. Could you check whether it's really correctly patched, e.g. by the patch like below?
Quoted 7 lines
That patch works. Thanks!
Quoted 2 lines
It seems applying my previous patch on 2.6.28 puts the code into a wrong place.
I haven't succeeded in getting either of your recent patches to work against 2.6.28-git13. I'll work on it more later.
The previous patch was for 2.6.28 while the first one was for git. Maybe just because of a line difference.
Could you try test/cf74-fix branch on sound git tree?
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git test/cf74-fix
Takashi
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Sat, 10 Jan 2009 09:34:57 -0500,
Quoted 7 lines · Kyler Laird
Quoted 2 lines · Takashi Iwai
Could you try test/cf74-fix branch on sound git tree?
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.gittest/cf74-fixThat didn't work for me. I see:
Quoted 14 lines
HDA Intel 0000:00:1b.0: power state changed by ACPI to D0 HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22 HDA Intel 0000:00:1b.0: setting latency timer to 64 input: HDA Intel at 0xe8640000 irq 22 Line In at Ext Rear Jack as /class/input/input7 input: HDA Intel at 0xe8640000 irq 22 Mic at Ext Front Jack as /class/input/input8 input: HDA Intel at 0xe8640000 irq 22 Mic at Ext Rear Jack as /class/input/input9 input: HDA Intel at 0xe8640000 irq 22 Speaker at Ext Rear Jack as /class/input/input10 input: HDA Intel at 0xe8640000 irq 22 HP Out at Ext Front Jack as /class/input/input11
These are all OK. The new messages regarding input device are for jack-sensing stuff.
Could you run alsa-info.sh on the latest kernel, too?
Also, to be sure, try to put a printk in the quirk for CF-74 (disabling hp_detect) to confirm it's activated.
thanks,
Takashi