At Thu, 17 Jan 2013 21:40:43 +0100, Manolo Díaz wrote:
El jue, 17 ene 2013 a las 21:16 horas Takashi Iwai escribió:
At Thu, 17 Jan 2013 19:12:24 +0100, Manolo Díaz wrote:
El jue, 17 ene 2013 a las 16:32 horas Takashi Iwai escribió:
At Thu, 17 Jan 2013 09:59:20 -0500, Miro Hodak wrote:
On Thu, Jan 17, 2013 at 7:49 AM, Raymond Yau superquad.vortex2@gmail.comwrote:
> > OK, now as far as Auto-Mute goes, should it do what expected when enabled - i.e. muting the speakers when headphones are connected to the front panel? I have tried that, does not seem to work. >
Do your computer chassis have a hda front audio panel with Jack detection ?
The front headphone Jack should return true when headphone Jack is plugged
control.35 { iface CARD name 'Front Headphone Jack'
value false comment { access read type BOOLEAN count 1 } }
All ADI codecs support impedance measurement
Try the modified hda-jack-sense-test which need hda-analyzer
http://thread.gmane.org/gmane.linux.alsa.devel/90911/focus=91115
Hmmm, ran into some python issues. Even hda-analyzer itself is not working: ... File "/dev/shm/hda-analyzer/hda_proc.py", line 143, in wrongfile raise ValueError, "wrong proc file format (%s)" % msg ValueError: wrong proc file format (integer decode 'State of AFG node 0x01:' ('Node '))
Ah, it's a new proc file entry that has been added recently. hda-analyzer needs to be fixed.
In anyway, only for checking the presence unsolicited events, you can do without extra program. Suppose you built your kernel with the tracing support. See "Tracepoints" option in Documentation/sound/alsa/HD-Audio.txt.
# echo 1 > /sys/kernel/debug/tracing/events/hda/hda_unsol_event/enable
(plug and unplug your headphone jacks)
# cat /sys/kernel/debug/tracing/trace
If you see some hda_unsol_event lines there, it implies that the jack detection basically works in hardware level.
Takashi
I Suppose that when auto-mute is enabled an HP independent is disabled, inserting the HP jack should disable sound from front speakers. If so then auto-mute doesn't work. Jack insertion/extraction events are well detected for front speakers and HP.
#~ cat /sys/kernel/debug/tracing/trace # tracer: nop # # entries-in-buffer/entries-written: 4/4 #P:2 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | <idle>-0 [001] d.h. 137.881919: hda_unsol_event: [0] res=8000000, res_ex=10 <idle>-0 [001] d.h. 162.511102: hda_unsol_event: [0] res=8000000, res_ex=10 <idle>-0 [001] d.h. 246.529813: hda_unsol_event: [0] res=4000000, res_ex=10 <idle>-0 [001] d.h. 272.381719: hda_unsol_event: [0] res=4000000, res_ex=10
branch tested: test/hda-gen-parser
Please test with either master or test/hda-migrate branch. test/hda-gen-parser branch doesn't contain the patch for AD codecs.
In anyway, please attach alsa-info.sh outputs before and after plugging the headphone with the latest sound-unstable tree (and a proper branch).
thanks,
Takashi
branch tested: master
commit d89012bef4ad6d33c1050dd2924f010f5072ff52 Merge: ad92fbe 36c9db7 Author: Takashi Iwai tiwai@suse.de Date: Thu Jan 17 17:47:19 2013 +0100
Just the same: auto-mute doesn't work.
alsa-info output show no differences (attached).
Thanks. It turned out that simply missing unsol_event handlers in the codec driver code. The patch below should fix the issue. It's already merged in test/hda-migrate and master branches.
Takashi
--- From: Takashi Iwai tiwai@suse.de Subject: [PATCH] ALSA: hda - Fix missing unsol event handler in some codec drivers
This resulted in non-working auto-mute behavior, of course...
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/hda/patch_analog.c | 1 + sound/pci/hda/patch_ca0110.c | 1 + sound/pci/hda/patch_cmedia.c | 1 + 3 files changed, 3 insertions(+)
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 02fe0d1..6feaec4 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -595,6 +595,7 @@ static const struct hda_codec_ops ad198x_auto_patch_ops = { .build_pcms = snd_hda_gen_build_pcms, .init = snd_hda_gen_init, .free = ad198x_free, + .unsol_event = snd_hda_jack_unsol_event, #ifdef CONFIG_PM .check_power_status = snd_hda_gen_check_power_status, .suspend = ad198x_suspend, diff --git a/sound/pci/hda/patch_ca0110.c b/sound/pci/hda/patch_ca0110.c index 8d09325..db7635c 100644 --- a/sound/pci/hda/patch_ca0110.c +++ b/sound/pci/hda/patch_ca0110.c @@ -36,6 +36,7 @@ static const struct hda_codec_ops ca0110_patch_ops = { .build_pcms = snd_hda_gen_build_pcms, .init = snd_hda_gen_init, .free = snd_hda_gen_free, + .unsol_event = snd_hda_jack_unsol_event, };
static int ca0110_parse_auto_config(struct hda_codec *codec) diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c index 04dd3b6..087cabb 100644 --- a/sound/pci/hda/patch_cmedia.c +++ b/sound/pci/hda/patch_cmedia.c @@ -576,6 +576,7 @@ static const struct hda_codec_ops cmi_auto_patch_ops = { .build_pcms = snd_hda_gen_build_pcms, .init = snd_hda_gen_init, .free = snd_hda_gen_free, + .unsol_event = snd_hda_jack_unsol_event, };
static int cmi_parse_auto_config(struct hda_codec *codec)