diff mbox

Front speakers doesn't work in multichannel output, regression in ALC888

Message ID CAN8cciYwq8N6SHReQdre=G16E2gFbRdkuHNEAj0fb29e4M9xKQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Raymond Yau May 9, 2015, 6 a.m. UTC
>
> >
> 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


Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
diff mbox

Patch

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 */
_______________________________________________
Alsa-devel mailing list