All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raymond Yau <superquad.vortex2@gmail.com>
To: "Łukasz Wojniłowicz" <lukasz.wojnilowicz@gmail.com>,
	"ALSA Development Mailing List" <alsa-devel@alsa-project.org>,
	tiwai@suse.de, pulseaudio-discuss@lists.freedesktop.org
Subject: Re: [alsa-devel] Front speakers doesn't work in multichannel output, regression in ALC888
Date: Sat, 9 May 2015 14:00:49 +0800	[thread overview]
Message-ID: <CAN8cciYwq8N6SHReQdre=G16E2gFbRdkuHNEAj0fb29e4M9xKQ@mail.gmail.com> (raw)
In-Reply-To: <4324603.tPLEjaP5mH@luklap.workgroup>


[-- Attachment #1.1: Type: text/plain, Size: 4057 bytes --]

>
> >
> http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixe
> > > > r/paths/analog-output-headphones.conf
> > > >
> > > > pulseaudio mute external center/lfe controls when headphone jack is
> >
> > plugged
>
> That would be unwanted.
>

This is common to all notebook using headphone jack and two other jacks to
support surround51 or surround71 since pulseaudio mute the other retasked
mio jack when headphone jack is plugged


>
> > > I used hdajackretask to override:
> > > PIN ID: 0x15 to "Line out (front)"
>

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/patch/sound/pci/hda/patch_realtek.c?id=c3e837bbcc03e39991da5dd1f791c06cde9f7a45

When the static model were used, the jack was configured as line out
instead of headphone jack and there is no headphone playback volume

-static const struct hda_verb alc888_acer_aspire_4930g_verbs[] = {
-/* Enable unsolicited event for HP jack */
-    {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC_HP_EVENT | AC_USRSP_EN},
-/* Connect HP out to front */
-    {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
-    {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
-    {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
-    {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},

-static const struct snd_kcontrol_new alc888_acer_aspire_4930g_mixer[] = {
-    HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
-    HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),

The jack is configured as headphone jack after the auto parser is used


> > Pulseaudio don't know node 0x15 is headphone / Line Out (External
> speaker)
> >
> > select speaker profile mute the headphone playback switch
>
> Doesn't HP mean HeadPhone? Isn't solution to my problem obvious, namely add
> Line out capability to 0x15?
>
>
Are there any side effect if you change the headphone jack to Line Out jack
as the jack no longer enable HP amp ?


use add_out_jack_modes for create Headphone/Line Out jack mode control to
change Headphone to Line Out and vice versa


diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 3d2597b..f25cd23 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -180,10 +180,10 @@ static void parse_user_hints(struct hda_codec *codec)
     /* the following two are just for compatibility */
     val = snd_hda_get_bool_hint(codec, "add_out_jack_modes");
     if (val >= 0)
-        spec->add_jack_modes = !!val;
+        spec->add_out_jack_modes = !!val;
     val = snd_hda_get_bool_hint(codec, "add_in_jack_modes");
     if (val >= 0)
        spec->add_jack_modes = !!val;
@@ -2640,7 +2642,7 @@ static void get_jack_mode_name(struct hda_codec
*codec, hda_nid_t pin,
 static int get_out_jack_num_items(struct hda_codec *codec, hda_nid_t pin)
 {
     struct hda_gen_spec *spec = codec->spec;
-    if (spec->add_jack_modes) {
+    if (spec->add_out_jack_modes || spec->add_jack_modes) {
         unsigned int pincap = snd_hda_query_pin_caps(codec, pin);
         if ((pincap & AC_PINCAP_OUT) && (pincap & AC_PINCAP_HP_DRV))
             return 2;
@@ -4892,7 +4895,7 @@ int snd_hda_gen_parse_auto_config(struct hda_codec
*codec,
             return err;
     }

-    if (spec->add_jack_modes) {
+    if (spec->add_out_jack_modes || spec->add_jack_modes) {
         if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) {
             err = create_out_jack_modes(codec, cfg->line_outs,
                             cfg->line_out_pins);
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 56e4139..8d7568b 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -227,6 +227,8 @@ struct hda_gen_spec {
     unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */
     unsigned int add_stereo_mix_input:2; /* add aamix as a capture src */
     unsigned int add_jack_modes:1; /* add i/o jack mode enum ctls */
+    unsigned int add_out_jack_modes:1;
     unsigned int power_down_unused:1; /* power down unused widgets */
     unsigned int dac_min_mute:1; /* minimal = mute for DACs */

[-- Attachment #1.2: Type: text/html, Size: 5801 bytes --]

[-- Attachment #2: Type: text/plain, Size: 186 bytes --]

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

  parent reply	other threads:[~2015-05-09  6:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-02  5:42 Front speakers doesn't work in multichannel output, regression in ALC888 Łukasz Wojniłowicz
2015-05-02  8:05 ` Takashi Iwai
2015-05-02  9:36 ` Raymond Yau
     [not found]   ` <7993879.9dprRWFvNQ@luklap.workgroup>
2015-05-03  7:53     ` [alsa-devel] " Raymond Yau
     [not found] ` <29807127.PULdKhJLmi@luklap.workgroup>
2015-05-06 18:23   ` Raymond Yau
     [not found]     ` <1736431.dmQFUpE69t@luklap.workgroup>
2015-05-08  6:49       ` [alsa-devel] " Raymond Yau
     [not found]   ` <CAN8cciapcbygVjS20+Ln6aDJbd3poieo6-8Zq3x69brsqr+Raw@mail.gmail.com>
     [not found]     ` <4324603.tPLEjaP5mH@luklap.workgroup>
2015-05-05 16:47       ` Raymond Yau
     [not found]         ` <4678913.FpDgrA5u1d@luklap.workgroup>
2015-05-11  2:34           ` Raymond Yau
     [not found]             ` <CAN8cciZS8MhXWy5anxMSgtLdDYHQtURXJ2iEoL0YMpb41EifHg@mail.gmail.com>
     [not found]               ` <d3bbb31411796d9f835396d30dcaa309@mail.onse.fi>
2015-05-14  6:26                 ` Fwd: " Raymond Yau
2015-05-14  7:45                   ` Anssi Hannula
2015-05-17  1:49                     ` Raymond Yau
2015-05-09  6:00       ` Raymond Yau [this message]
2015-06-07 12:44 ` [alsa-devel] " Raymond Yau
     [not found] ` <8386507.uauZCcniqC@luklap.workgroup>
     [not found]   ` <CAN8cciaTZYOQAkaE2aquzcZ_a1QkJAz7u+ff2ceTyrXnKr50RQ@mail.gmail.com>
     [not found]     ` <5853893.pVbPai8A2z@luklap.workgroup>
2015-06-09  2:23       ` Fwd: " Raymond Yau
     [not found]       ` <CAN8ccib5rgh2UjNG9isbAkTgMM7MhwL+FMxdd-4Z79Qng5hRNA@mail.gmail.com>
     [not found]         ` <CAN8cciY=bSpebNXqzYc+Q+MDd9Gr3+KGnpS0GBQpES+-XTY0Dw@mail.gmail.com>
2015-06-09  4:03           ` Fwd: " Raymond Yau
     [not found]             ` <31911886.6mcodbBrA7@luklap.workgroup>
2015-07-11  1:18               ` Raymond Yau

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='CAN8cciYwq8N6SHReQdre=G16E2gFbRdkuHNEAj0fb29e4M9xKQ@mail.gmail.com' \
    --to=superquad.vortex2@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lukasz.wojnilowicz@gmail.com \
    --cc=pulseaudio-discuss@lists.freedesktop.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.