All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregorio Guidi <gregorio.guidi@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] fix headphone settings and master volume	(Conexant CX20551 0x103c30b2)
Date: Wed, 11 Mar 2009 22:22:39 +0100	[thread overview]
Message-ID: <200903112222.40445.gregorio.guidi@gmail.com> (raw)
In-Reply-To: <s5hmybtigal.wl%tiwai@suse.de>

On Tuesday 10 March 2009 15:49:38 Takashi Iwai wrote:
> At Mon, 9 Mar 2009 20:19:35 +0100,
>
> ...
>
> Thanks, that helps for debugging.
>
> Looking through the current patch_conexant.c, there are other messy
> codes there, too.  So I cleaned up and fixed it on sound git tree
> now.  Any chance to try it out?  The GIT tree is found at:
>
>    git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git

I managed to test a kernel snapshot with the latest changes, thanks for taking 
the time to refactor and clean up the code there.
There are still issues, though: at the moment, the "Speaker" control does not 
work. Consequently, automute does not work and Master only controls 
headphones.

I think there is a problem with this changeset:
http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=commitdiff;h=5b3a7440cbabdda07cfb3dcf4a07e0115a3dff9a

Specifically, I had to revert part of that patch to get all the functionality 
back. The bits I reverted are in the patch at the end of the mail.

It looks like these two lines:
	static hda_nid_t cxt5047_dac_nids[2] = { 0x10, 0x1c };
	...
	{0x1d, AC_VERB_SET_CONNECT_SEL, 0x0}

are needed to have a working "Speaker" control, you probably know better than 
me what it means. 
I also readded the "PCM-2" lines. While not strictly necessary, if they are 
not there the speaker volume is stuck at a very low level and cannot be 
raised, as if the PCM-2 volume starts at a low value at boot. Actually, if I 
recall correctly the low speaker volume was a problem in early versions of the 
driver and the "PCM-2" controls were introduced for that reason.
But obviously if there is a way to avoid the widget 0x1c and have a working 
"Speaker" control that would be best.

Hope this makes some sense to you.

Gregorio

--- patch_conexant.c.orig       2009-03-11 22:02:44.000000000 +0100
+++ patch_conexant.c    2009-03-11 22:03:09.000000000 +0100
@@ -1165,7 +1165,7 @@
 /* Conexant 5047 specific */
 #define CXT5047_SPDIF_OUT      0x11

-static hda_nid_t cxt5047_dac_nids[1] = { 0x10 }; /* 0x1c */
+static hda_nid_t cxt5047_dac_nids[2] = { 0x10, 0x1c };
 static hda_nid_t cxt5047_adc_nids[1] = { 0x12 };
 static hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a };

@@ -1263,6 +1263,8 @@
        HDA_CODEC_MUTE("Capture Switch", 0x12, 0x03, HDA_INPUT),
        HDA_CODEC_VOLUME("PCM Volume", 0x10, 0x00, HDA_OUTPUT),
        HDA_CODEC_MUTE("PCM Switch", 0x10, 0x00, HDA_OUTPUT),
+       HDA_CODEC_VOLUME("PCM-2 Volume", 0x1c, 0x00, HDA_OUTPUT),
+       HDA_CODEC_MUTE("PCM-2 Switch", 0x1c, 0x00, HDA_OUTPUT),
        {
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
                .name = "Master Playback Switch",
@@ -1294,7 +1296,7 @@
        /* HP, Speaker  */
        {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
        {0x13, AC_VERB_SET_CONNECT_SEL, 0x0}, /* mixer(0x19) */
-       {0x1d, AC_VERB_SET_CONNECT_SEL, 0x1}, /* mixer(0x19) */
+       {0x1d, AC_VERB_SET_CONNECT_SEL, 0x0}, /* mixer(0x19) */
        /* Record selector: Mic */
        {0x12, AC_VERB_SET_CONNECT_SEL,0x03},
        {0x19, AC_VERB_SET_AMP_GAIN_MUTE,

  reply	other threads:[~2009-03-11 21:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-08 20:19 [PATCH] fix headphone settings and master volume (Conexant CX20551 0x103c30b2) Gregorio Guidi
2009-03-09 11:50 ` Takashi Iwai
2009-03-09 14:49   ` Gregorio Guidi
2009-03-09 15:04     ` Takashi Iwai
2009-03-09 19:19       ` Gregorio Guidi
2009-03-10 14:49         ` Takashi Iwai
2009-03-11 21:22           ` Gregorio Guidi [this message]
2009-03-12  6:43             ` Takashi Iwai
2009-03-12 14:00               ` Gregorio Guidi
2009-03-12 14:18                 ` Takashi Iwai
2009-03-12 14:35                   ` Gregorio Guidi
2009-03-12 16:11                     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200903112222.40445.gregorio.guidi@gmail.com \
    --to=gregorio.guidi@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.