From: Takashi Iwai Subject: Re: First test of the hda-jack branch Date: Mon, 14 Nov 2011 10:32:07 +0100 Message-ID: References: <4EBD4C04.3090406@canonical.com> <4EBD80CF.2070203@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id E91B424646 for ; Mon, 14 Nov 2011 10:32:09 +0100 (CET) In-Reply-To: <4EBD80CF.2070203@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: David Henningsson Cc: ALSA Development Mailing List List-Id: alsa-devel@alsa-project.org 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. thanks, Takashi --- diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c index 3bcf623..e014562 100644 --- a/sound/pci/hda/hda_jack.c +++ b/sound/pci/hda/hda_jack.c @@ -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) return -ENOMEM; jack->kctl = kctl; + snd_kctl_jack_report(codec->bus->card, kctl, + snd_hda_jack_detect(codec, nid)); return 0; } EXPORT_SYMBOL_HDA(snd_hda_jack_add_kctl);