[alsa-devel] First test of the hda-jack branch
tiwai at suse.de
Mon Nov 14 10:32:07 CET 2011
At Fri, 11 Nov 2011 21:08:47 +0100,
David Henningsson wrote:
> On 11/11/2011 05:52 PM, Takashi Iwai wrote:
> > At Fri, 11 Nov 2011 17:23:32 +0100,
> > David Henningsson wrote:
> >> Hi Takashi,
> >> After having some troubles with the kernel scripts (on the Ubuntu side)
> >> I've managed to try out your test/hda-jack branch. I'm attaching a patch
> >> I had to apply to make the modules load properly.
> >> After having applied the attached patch, I get stuck at an OOPS, which I
> >> don't have time to troubleshoot further today. I'm attaching the OOPS
> >> log as well (alsa-info for the system I'm testing on is the same as I
> >> sent you a few days ago).
> > Thanks for testing! I obviously didn't test the recent version :-<
> > Try the patch below.
> Thanks for the quick reply! With the below patch the card starts
> successfully. I have now tested it on two machines and I'm using the
> "amixer contents" command to see the current jack status.
> The jack state seems to be correct except in one occasion: at startup
> all jacks are "off", even though the machine was booted up with some
> jacks inserted. After having inserted or removed at runtime, the jack
> status is corrected.
Right, this was a missing initialization. The patch below should fix.
> In addition, I have a question about the second machine, which looks
> like this:
> numid=45,iface=CARD,name='Front Headphone Jack'
> numid=47,iface=CARD,name='Front Mic Jack'
> numid=48,iface=CARD,name='Line Jack'
> numid=41,iface=CARD,name='Line-Out Jack'
> numid=42,iface=CARD,name='Line-Out Jack',index=1
> numid=43,iface=CARD,name='Line-Out Jack',index=2
> numid=44,iface=CARD,name='Line-Out Jack',index=3
> numid=46,iface=CARD,name='Rear Mic Jack'
> Would it be possible to name the Line-Out Jacks "Front Line-Out",
> "Surround Line-Out" etc, so one can tell which one is which? Or can you
> always tell that just from the order of them?
I can assign more intuitive names for the output, certainly.
I'll consider the implementation.
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index 3bcf623..e014562 100644
@@ -225,6 +225,8 @@ int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
if (snd_hda_ctl_add(codec, nid, kctl) < 0)
jack->kctl = kctl;
+ snd_kctl_jack_report(codec->bus->card, kctl,
+ snd_hda_jack_detect(codec, nid));
More information about the Alsa-devel