alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Raymond Yau <superquad.vortex2@gmail.com>
To: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Takashi Iwai <tiwai@suse.de>
Subject: Re: Via VT2020: issues with kernel 2.6.38.{2, 3} (alsa 1.0.23) - working with 2.6.33.2 (alsa 1.0.21)
Date: Sun, 19 Jun 2011 09:46:43 +0800	[thread overview]
Message-ID: <BANLkTi=e2L+XDj51KQCaBGH4r+_0ST5r+A@mail.gmail.com> (raw)
In-Reply-To: <BANLkTime=EgRduJaUYpDB=E08=e7Zn+rMg@mail.gmail.com>

2011/6/12 alex dot baldacchino dot alsasub at gmail dot com
<alex.baldacchino.alsasub@gmail.com>:
> IMPORTANT UPDATE!!!!!
>
> Node 0x0b can drive HP! The problem was function
> set_widgets_power_state_vt1718S() not updating power state for the
> correct nid, solved as follows:
>
>
> static void set_widgets_power_state_vt1718S(struct hda_codec *codec)
> {
> ...
>        if (spec->hp_independent_mode) {
> -               /* PW4 (28h), MW3 (1bh), MUX1(34h), AOW4 (ch) */
> +               /* PW4 (28h), MW3 (1bh), MUX1(34h), AOW4 (ch) of AOW3 (bh) */
>                parm = AC_PWRST_D3;
>                set_pin_power_state(codec, 0x28, &parm);
>                snd_hda_codec_write(codec, 0x1b, 0,
>                                    AC_VERB_SET_POWER_STATE, parm);
>                snd_hda_codec_write(codec, 0x34, 0,
>                                    AC_VERB_SET_POWER_STATE, parm);
> -               snd_hda_codec_write(codec, 0xc, 0,
> +               snd_hda_codec_write(codec, spec->multiout.hp_nid, 0,
>                                    AC_VERB_SET_POWER_STATE, parm);
>        }
>

Can your hear the same signal from black and orange jack when you
playing stereo to hw:0,0,0 ?

if you look at snd_hda_multi_out_analog_prepare() in hda_codec.c,

if mout->no_share_stream=0 ,it seem that there is "upmix" feature when
mout->num_dacs is 4 for those 5 jacks/6 jacks motherboard

i.e. the black and orange jacks can have the same signal as the green jack

	/* front */
	snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag,
				   0, format);
	if (!mout->no_share_stream &&
	    mout->hp_nid && mout->hp_nid != nids[HDA_FRONT])
		/* headphone out will just decode front left/right (stereo) */
		snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag,
					   0, format);
	/* extra outputs copied from front */
	for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++)
		if (!mout->no_share_stream && mout->extra_out_nid[i])
			snd_hda_codec_setup_stream(codec,
						   mout->extra_out_nid[i],
						   stream_tag, 0, format);

	/* surrounds */
	for (i = 1; i < mout->num_dacs; i++) {
		if (chs >= (i + 1) * 2) /* independent out */
			snd_hda_codec_setup_stream(codec, nids[i], stream_tag,
						   i * 2, format);
		else if (!mout->no_share_stream) /* copy front */
			snd_hda_codec_setup_stream(codec, nids[i], stream_tag,
						   0, format);
	}
	return 0;
}

> but in via_independent_hp_put():
>
>
>        unsigned int pinsel = ucontrol->value.enumerated.item[0];
>        /* Get Independent Mode index of headphone pin widget */
>        spec->hp_independent_mode = spec->hp_independent_mode_index == pinsel
>                ? 1 : 0; /* <- TROUBLES! */
>
>
> When turning on Independent HP mode for codec VT1718S, pinsel is 1,
> when turning it off that's 0, thus, if spec->hp_independent_mode_index
> is 2, spec->hp_independent_mode is always 0 (condition
> spec->hp_independent_mode_index == pinsel alwyas fails) and
> corresponding controls can't be activated:
>
>
>        /* update HP volume/swtich active state */
>        if (spec->codec_type == VT1708S
>            || spec->codec_type == VT1702
>            || spec->codec_type == VT1718S
>            || spec->codec_type == VT1716S
>            || VT2002P_COMPATIBLE(spec)) {
>                activate_ctl(codec, "Headphone Playback Volume",
>                             spec->hp_independent_mode);
>                activate_ctl(codec, "Headphone Playback Switch",
>                             spec->hp_independent_mode);
>        }
>

if the hp jack can also use "copy front" mode for "redirected headphone"

the driver don't need to disable "Headphone Playback Volume" for those
10 channels codecs or change the connection in
via_independent_hp_put()

For those 3 jacks motherobard, "channel mode" 6-8 or "Use HP as Side"
switch may just need tot switch the connection to use 0x0b or 0x0c if
0b has  "Side Playback Volume" and 0x0c has "Headphone Playback
Volume"

  reply	other threads:[~2011-06-19  1:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-07 17:30 Via VT2020: issues with kernel 2.6.38.{2, 3} (alsa 1.0.23) - working with 2.6.33.2 (alsa 1.0.21) alex dot baldacchino dot alsasub at gmail dot com
2011-05-08  6:40 ` Raymond Yau
2011-05-08 23:16   ` alex dot baldacchino dot alsasub at gmail dot com
2011-05-10  2:03     ` Raymond Yau
2011-05-16 16:03       ` alex dot baldacchino dot alsasub at gmail dot com
2011-05-18  3:36         ` Raymond Yau
2011-05-27 14:49           ` alex dot baldacchino dot alsasub at gmail dot com
2011-05-31 13:34             ` Raymond Yau
2011-06-01 16:16               ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-07  8:32                 ` Raymond Yau
2011-06-08 14:33                   ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-09 16:08                     ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-11 20:24                       ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-19  1:46                         ` Raymond Yau [this message]
2011-06-20  1:19                           ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-20  7:13                             ` Raymond Yau
2011-06-20 13:48                               ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-14  4:05                     ` Raymond Yau
2011-06-18  8:29                     ` Raymond Yau
2011-06-19 12:44                       ` alex dot baldacchino dot alsasub at gmail dot com
  -- strict thread matches above, loose matches on Subject: below --
2011-06-16 18:50 alex dot baldacchino dot alsasub at gmail dot com

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='BANLkTi=e2L+XDj51KQCaBGH4r+_0ST5r+A@mail.gmail.com' \
    --to=superquad.vortex2@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).