All of lore.kernel.org
 help / color / mirror / Atom feed
* Front speakers doesn't work in multichannel output, regression in ALC888
@ 2015-05-02  5:42 Łukasz Wojniłowicz
  2015-05-02  8:05 ` Takashi Iwai
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Łukasz Wojniłowicz @ 2015-05-02  5:42 UTC (permalink / raw)
  To: alsa-devel

Hi all,

My problem is that when I set channel output to "Analog output surround 5.1" 
(or 2.1 or 4.1), I hear no sound in front speakers, but in case of 5.1 or 4.1 
I can hear sound in rear speakers. I use kernel 3.19.5 and it didn't happen in 
earlier kernels that is 3.18 and in 3.17 for sure.

My configuration is:
OS: Fedora 21 64 bit
SoundCard: ALC888
Model name: acer-aspire-4930g
Laptop: Acer Aspire 5930g
Speakers: external 5.1 with 3 jacks
Sound channel configuration module is standard configuration module from KDE.

Additional info:
1) When channel output is 5.1 and I unplug green jack and leave two others 
jacks connected then I can hear sound in laptop internal speakers.
2) Earlier (kernel 3.18 and 3.17) I didn't have possibility to choose 2.1 
configuration and additionally to 4.1 configuration I could also choose 4.0 
configuration.

Thanks for looking into problem.

Cheers
LW

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Front speakers doesn't work in multichannel output, regression in ALC888
  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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Takashi Iwai @ 2015-05-02  8:05 UTC (permalink / raw)
  To: Łukasz Wojniłowicz; +Cc: alsa-devel

At Sat, 02 May 2015 07:42:27 +0200,
Łukasz Wojniłowicz wrote:
> 
> Hi all,
> 
> My problem is that when I set channel output to "Analog output surround 5.1" 
> (or 2.1 or 4.1), I hear no sound in front speakers, but in case of 5.1 or 4.1 
> I can hear sound in rear speakers. I use kernel 3.19.5 and it didn't happen in 
> earlier kernels that is 3.18 and in 3.17 for sure.
> 
> My configuration is:
> OS: Fedora 21 64 bit
> SoundCard: ALC888
> Model name: acer-aspire-4930g
> Laptop: Acer Aspire 5930g
> Speakers: external 5.1 with 3 jacks
> Sound channel configuration module is standard configuration module from KDE.
> 
> Additional info:
> 1) When channel output is 5.1 and I unplug green jack and leave two others 
> jacks connected then I can hear sound in laptop internal speakers.
> 2) Earlier (kernel 3.18 and 3.17) I didn't have possibility to choose 2.1 
> configuration and additionally to 4.1 configuration I could also choose 4.0 
> configuration.
> 
> Thanks for looking into problem.

I don't remember any relevant change...  Could you try git bisect?


thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Front speakers doesn't work in multichannel output, regression in ALC888
  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>
       [not found] ` <29807127.PULdKhJLmi@luklap.workgroup>
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Raymond Yau @ 2015-05-02  9:36 UTC (permalink / raw)
  To: Łukasz Wojniłowicz; +Cc: ALSA Development Mailing List

> My problem is that when I set channel output to "Analog output surround
> 5.1"
> (or 2.1 or 4.1), I hear no sound in front speakers, but in case of 5.1 or
> 4.1
> I can hear sound in rear speakers. I use kernel 3.19.5 and it didn't
> happen in
> earlier kernels that is 3.18 and in 3.17 for sure.
>
> My configuration is:
> OS: Fedora 21 64 bit
> SoundCard: ALC888
> Model name: acer-aspire-4930g
> Laptop: Acer Aspire 5930g
> Speakers: external 5.1 with 3 jacks
> Sound channel configuration module is standard configuration module from
> KDE.
>
> Additional info:
> 1) When channel output is 5.1 and I unplug green jack and leave two others
> jacks connected then I can hear sound in laptop internal speakers.
> 2) Earlier (kernel 3.18 and 3.17) I didn't have possibility to choose 2.1
> configuration and additionally to 4.1 configuration I could also choose 4.0
> configuration.
>
> You need to switch "Channel mode" to "6 ch" if you need to use external
5.1 speakers since you have 5.1 internal speakers

this change pin-ctl of headphone jack, mic jack and line in to OUT

post the output of alsa-info.sh

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]   ` <7993879.9dprRWFvNQ@luklap.workgroup>
@ 2015-05-03  7:53     ` Raymond Yau
  0 siblings, 0 replies; 16+ messages in thread
From: Raymond Yau @ 2015-05-03  7:53 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, ALSA Development Mailing List,
	pulseaudio-discuss, tiwai


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

> > > My problem is that when I set channel output to "Analog output
surround
> > > 5.1"
> > > (or 2.1 or 4.1), I hear no sound in front speakers, but in case of
5.1 or
> > > 4.1

You need pulseaudio lfe-filter for 2.1

http://cgit.freedesktop.org/pulseaudio/pulseaudio/log/?qt=grep&q=lfe-filter

do you mean surround21 need 6 channel instead of channels with 5.1 internal
/external speaker ?

http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=48f1b308cc66152eb6db66742dd0d08d888cda8d;hp=5c4cd46810cef8850b037fca9e38ffd43b0bff22


> > > I can hear sound in rear speakers. I use kernel 3.19.5 and it didn't
> > > happen in
> > > earlier kernels that is 3.18 and in 3.17 for sure.
> > >
> > > My configuration is:
> > > OS: Fedora 21 64 bit
> > > SoundCard: ALC888
> > > Model name: acer-aspire-4930g
> > > Laptop: Acer Aspire 5930g
> > > Speakers: external 5.1 with 3 jacks
> > > Sound channel configuration module is standard configuration module
from
> > > KDE.
> > >
> > > Additional info:
> > > 1) When channel output is 5.1 and I unplug green jack and leave two
others
> > > jacks connected then I can hear sound in laptop internal speakers.

auto mute only check headphone jack or line out jack but not those retasked
mio jacks


> > > 2) Earlier (kernel 3.18 and 3.17) I didn't have possibility to choose
2.1
> > > configuration and additionally to 4.1 configuration I could also
choose
> > > 4.0
> > > configuration.
> > >
> > > You need to switch "Channel mode" to "6 ch" if you need to use
external
> >
> > 5.1 speakers since you have 5.1 internal speakers
> >
> > this change pin-ctl of headphone jack, mic jack and line in to OUT
> >
> > post the output of alsa-info.sh
>
> I always switched to "6 ch" through alsamixer. It always worked as
expected,
> but recently I've got problems with it so it regressed somewhere.

>
>
> My alsa-info.sh with "6 ch" set through alsamixer and "Analog output
surround
> 5.1 + Analog input stereo" set through KDE configuration module.
> http://www.alsa-project.org/db/?f=ff3f5a1f7f3e4662c3fa9bcf0158474a076b4cc4
>
> With that I hear all channels except front left and front right.

autoconfig for ALC888: line_outs=3 (0x14/0x17/0x16/0x0/0x0) type:speaker
   speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
   hp_outs=1 (0x15/0x0/0x0/0x0/0x0)
   mono: mono_out=0x0
   dig-out=0x1e/0x0
   inputs:
     Mic=0x18
     Internal Mic=0x12
     Line=0x1a


==> Best config: lo_type=2, wired=1, mio=1
multi_outs = 15/0/0/0 : 2/3/4/0 (type HP)
  out path: depth=3 '02:0c:15'
multi_ios(2) = 1a/18 : 3/4
  mio path: depth=3 '03:0d:1a'
  mio path: depth=3 '04:0e:18'
spk_outs = 14/17/16/0 : 5/25/4/0
  spk path: depth=3 '05:0f:14'
  spk path: depth=3 '25:26:17'
  spk path: depth=3 '04:0e:16'

Node 0x15 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Front Headphone Jack", index=0, device=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001003e: IN OUT HP EAPD Detect Trigger
  EAPD 0x2: EAPD
  Pin Default 0x0221101f: [Jack] HP Out at Ext Front
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26

it is still headphone jack with pin-ctl : 0xc0 OUT HP while mic jack and
line in jack 's pin ctl are changed to 0x40 OUT

channel mode only change two mio jacks from IN to OUT

May need to use add_out_jack_mode=1 instead of add_jack_modes=1 when there
are Mic and line in jacks

Use Headphone Jack Mode control to switch HP to Line Out for pin-ctl and
EAPD

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=f811c3cf8fae63ecc8a937ba7376490e2565f8f1

> To exclude that my speakers are broken or wrong connected: I get sound
from
> front left and front right if i switch in KDE configuration module to
"Analog
> duplex stereo", but then I get no sound from rest of my speakers.

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-headphones.conf

pulseaudio mute external center/lfe controls when headphone jack is plugged
since pulseaudio not aware that the role of headphone has been changed


[Element Center]
switch = off
volume = off

[Element LFE]
switch = off
volume = off


>
>
> KDE configuration module lets me choose "connector" configuration but
only in
> stereo mode.
> In stereo mode I can choose between "headphones" and "speakers".
> If it is set to "headphones" I hear sound in front left and front right
> speakers.
> If it is set to "speakers" I hear sound in rear left and rear right
speakers.
>

you need to switch "channel mode" to "2 ch" if you want to use your 5.1
internal speaker


https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=786c51f9168cfd2d49250c6e5e60035cbb2fd5a1


There are difference between static model and generic parser

[-- Attachment #1.2: Type: text/html, Size: 7231 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]     ` <4324603.tPLEjaP5mH@luklap.workgroup>
@ 2015-05-05 16:47       ` Raymond Yau
       [not found]         ` <4678913.FpDgrA5u1d@luklap.workgroup>
  2015-05-09  6:00       ` [alsa-devel] " Raymond Yau
  1 sibling, 1 reply; 16+ messages in thread
From: Raymond Yau @ 2015-05-05 16:47 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, ALSA Development Mailing List, tiwai

>
> > seem internal subwoofer only use one channel and don't have any stereo
to
> > mono downmix according to your patch
> >
> > It is not easy to assign different name to internal 4.1 and external 5.1
> > speaker when alc888 only has five DAC
> >
> > Some playback volume control  must be shared
>
> If you know what's missing, you could send a few lines of code and I will
test
> it, otherwise I'll have to experiment on my own.

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

As your patch indicate internal subwoofer use external center speaker
channel and your codec does not support L/R swap

You may need to reserve Audio mixer 0x26 for internal subwoofer playback
volume by restrict the connection of the internal rear speaker

excluding 0x26 so that last DAC can be assigned to the internal subwoofer
similar to alc889_fixup_dac_route

void alc888_fixup_dac_route(struct hda_codec *codec,
   const struct alc_fixup *fix, int action)
{
if (action == ALC_FIXUP_ACT_PRE_PROBE) {

hda_nid_t conn1[4] = { 0x0c, 0x0d, 0x0e, 0x0f};

snd_hda_override_conn_list(codec, 0x17, 4, conn1);

} else if (action == ALC_FIXUP_ACT_PROBE) {
conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
snd_hda_override_conn_list(codec, 0x17, 5, conn);

}
}

>
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/patch/sound/pci/hda/patch_realtek.c?id=
c3e837bbcc03e39991da5dd1f791c0 6cde9f7a45

> >
> > Do you mean internal subwoofer has low pass filter
>
> I don't know. How to check it?
>
>
> > what do you mean when you say 4.1 worked fine ?
>
> External 5.1 speakers working as 4.1 speakers because such profile was
set.
>
>
> > The channel map of internal 4.1 speaker are different from external 5.1
> > speaker
>
> Recently I also made such conclusion.
>

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=2d3391ec0ecca37efb6bc995906292f47522b471

Seem  4.1 is not defined in snd_pcm_std_chmap and you need to define and
add your 4.1  chmap similar to 2.1

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=ee81abb623cb5e03c182d16871bb4fb34fdc9b4f

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Front speakers doesn't work in multichannel output, regression in ALC888
       [not found] ` <29807127.PULdKhJLmi@luklap.workgroup>
@ 2015-05-06 18:23   ` Raymond Yau
       [not found]     ` <1736431.dmQFUpE69t@luklap.workgroup>
       [not found]   ` <CAN8cciapcbygVjS20+Ln6aDJbd3poieo6-8Zq3x69brsqr+Raw@mail.gmail.com>
  1 sibling, 1 reply; 16+ messages in thread
From: Raymond Yau @ 2015-05-06 18:23 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, tiwai, ALSA Development Mailing List
  Cc: David Henningsson

>
> > > > > My problem is that when I set channel output to "Analog output
> >
> > surround
> >
> > > > > 5.1"
> > > > > (or 2.1 or 4.1), I hear no sound in front speakers, but in case of
> >
> > 5.1 or
> >
> > > > > 4.1
> >
> > You need pulseaudio lfe-filter for 2.1
> >
> >
http://cgit.freedesktop.org/pulseaudio/pulseaudio/log/?qt=grep&q=lfe-filter
>
> External 5.1 and 4.1 worked fine without lfe-filter. Fedora doesn't
package lfe-
> filter and I'm more interested to get my 5.1 configuration back.
>
> > do you mean surround21 need 6 channel instead of channels with 5.1
internal
> > /external speaker ?
> >
> >
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=48f1b308cc66152eb
> > 6db66742dd0d08d888cda8d;hp=5c4cd46810cef8850b037fca9e38ffd43b0bff22
>
> No. When in KDE channel output is set to 2.1 it makes no difference what
is set
> in alsamixer. When my external speakers are disconnected built-in front
left
> and front right works on my laptop, but built-in subwoofer doesn't work
There
> is no difference what channel output is set in alsamixer.
>
> My laptop has built-in front left, front right, rear left, rear right and
> subwoofer and something is strange.
> When I set channel output to 5.1 or 4.1 and external speakers are
> disconnected, then front left and front right work as expected but
built-in
> subwoofer is heard only if I test rear left channel (wrong channel
mapping?)

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_codec.c?id=cd4035e814b04c009ece9939396d06370c53ed44

Seem only two pairs of stereo speakers and internal subwoofer at left
channel before this patch

ALSA: hda - Enable surround speakers (when line out is also present)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]     ` <1736431.dmQFUpE69t@luklap.workgroup>
@ 2015-05-08  6:49       ` Raymond Yau
  0 siblings, 0 replies; 16+ messages in thread
From: Raymond Yau @ 2015-05-08  6:49 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, ALSA Development Mailing List,
	pulseaudio-discuss


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

> > > My laptop has built-in front left, front right, rear left, rear right
and
> > > subwoofer and something is strange.
> > > When I set channel output to 5.1 or 4.1 and external speakers are
> > > disconnected, then front left and front right work as expected but
> >
> > built-in
> >
> > > subwoofer is heard only if I test rear left channel (wrong channel
> >
> > mapping?)
> >
> >
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pc
> > i/hda/hda_codec.c?id=cd4035e814b04c009ece9939396d06370c53ed44
> >
> > Seem only two pairs of stereo speakers and internal subwoofer at left
> > channel before this patch
> >
> > ALSA: hda - Enable surround speakers (when line out is also present)
>
> On my laptop case "Virtual SurroundSound" is written . When I test front
left
> and rear left, I hear distinct sound, so it would mean it's from two
different
> sources of sound.

The driver use more than two channels only after David 's patch

But all internal speakers of the notebook are at front of  the user, The 3D
sound effect is quite different from your external 5.1 speakers

Do you mean your 5930g need champ {FL FR RL RR LFE }?

This can be easily implemented by using "swap center/lfe" switch for those
codec support R/L swap

http://git.alsa-project.org/?p=alsa-lib.git;a=blob_plain;f=test/chmap.c;hb=HEAD

http://git.alsa-project.org/?p=alsa-lib.git;a=tree;f=src/conf/pcm;hb=HEAD

If codec does not support R/L swap, your 4.1 swap chmap need 5.0 routing

Do you expect pulseaudio show 4.1 swap(5.0) profile for internal speakers
and 4.1 and 5.1 profiles for external speakers ?

[-- Attachment #1.2: Type: text/html, Size: 2224 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]     ` <4324603.tPLEjaP5mH@luklap.workgroup>
  2015-05-05 16:47       ` Raymond Yau
@ 2015-05-09  6:00       ` Raymond Yau
  1 sibling, 0 replies; 16+ messages in thread
From: Raymond Yau @ 2015-05-09  6:00 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, ALSA Development Mailing List,
	tiwai, pulseaudio-discuss


[-- 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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]         ` <4678913.FpDgrA5u1d@luklap.workgroup>
@ 2015-05-11  2:34           ` Raymond Yau
       [not found]             ` <CAN8cciZS8MhXWy5anxMSgtLdDYHQtURXJ2iEoL0YMpb41EifHg@mail.gmail.com>
  0 siblings, 1 reply; 16+ messages in thread
From: Raymond Yau @ 2015-05-11  2:34 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, tiwai, ALSA Development Mailing List

> I started MS Windows and without externals speakers plugged in I could
test
> 5.1 configuration and it seemed that sound was coming from different
directions.

>
> What I managed to determine:
> I've got 3 stacks:
> 1 ST: Headphone, Line-out (FL and FR), SPDIF
> 2 ST: Microphone, Line-out (CLFE)
> 3 ST: Line-in, Line-out (RL and RR)
>
> I've got 5 responsive output pins
> PIN 0x14: Internal FL FR
> PIN 0x15: External FL FR
> PIN 0x17: Internal LFE
> PIN 0x18: External CLFE
> PIN 0x1a: External RL RR
>
> How can we make it work with these information?

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/Channel-Mapping-API.txt

seem chnmap type _FIXED , _VAR and _PAIRED does not fit when LFE and FC can
be swapped for internal speaker and external speaker

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=0fb87bb474f978446786263deff6263284e6e011

How do the driver implement channel map when codec has  swap center/lfe
switch ?

Do chnmap contain both {FL FR RL RR FC LFE} and {FL FR RL RR LFE FC} ?

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=5a61358433b1f89b500f2c365746c73cb7a27e2f

atihdmi_paired_swap_fc_lfe

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Fwd: Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]               ` <d3bbb31411796d9f835396d30dcaa309@mail.onse.fi>
@ 2015-05-14  6:26                 ` Raymond Yau
  2015-05-14  7:45                   ` Anssi Hannula
  0 siblings, 1 reply; 16+ messages in thread
From: Raymond Yau @ 2015-05-14  6:26 UTC (permalink / raw)
  To: Anssi Hannula, lukasz.wojnilowicz, ALSA Development Mailing List; +Cc: tiwai

>
> 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
>
> That's rather "relevant change". Good job in finding it. I would like such
> configuration (or better) back.
>
I don't see any side effect neither with your changes to hda_generic nor
> with
> vanilla kernel, but I don't know what problems should I expect.
>

Do headphone get same volume level when the jack is configured as Line Out
(without enable Headphone Amplifier) ?

The driver use different automute method when the jack is configured as HP
and Line Out

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=e0d32e335fc0e354db93a807736243f5035fbc67

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=a365fed9806e182cb4e1b7bb1855759489d95858
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths

if you look at speaker.conf , lineout.conf and headphone.conf, it seem
pulseaudio is unlikely mute all internal speakers when one pair of the
playback volume control need to be shared by internal speaker and external
speakers

you need dirver 's automute instead of pulseaudio 's automute


==> Best config: lo_type=2, wired=1, mio=1
multi_outs = 15/0/0/0 : 2/3/4/0 (type HP)
  out path: depth=3 '02:0c:15'
multi_ios(2) = 1a/18 : 3/4
  mio path: depth=3 '03:0d:1a'
  mio path: depth=3 '04:0e:18'
spk_outs = 14/17/16/0 : 5/25/4/0
  spk path: depth=3 '05:0f:14'
  spk path: depth=3 '25:26:17'
  spk path: depth=3 '04:0e:16'

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_generic.c?id=e80c60f3cbe76fa95029abc53b1a29172b51b96a

when line out type == AUTO_PIN_HP_OUT

should first do_mute() use speaker_path instead of out_path
<https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_generic.c?id=7385df6134888553b5ede71cd573ffe0429e2a80>

>>> I started MS Windows and without externals speakers plugged in I
>>
>> could test
>>  > 5.1 configuration and it seemed that sound was coming from
>> different directions.
>>
>>  >
>>  > What I managed to determine:
>>  > I've got 3 stacks:
>>  > 1 ST: Headphone, Line-out (FL and FR), SPDIF
>>  > 2 ST: Microphone, Line-out (CLFE)
>>  > 3 ST: Line-in, Line-out (RL and RR)
>>  >
>>  > I've got 5 responsive output pins
>>  > PIN 0x14: Internal FL FR
>>  > PIN 0x15: External FL FR
>>  > PIN 0x17: Internal LFE
>>  > PIN 0x18: External CLFE
>>  > PIN 0x1a: External RL RR
>>  >
>>  > How can we make it work with these information?

speaker-test -Dhw:0,0 -c6 -t wav

>>
>>
>>
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/Channel-Mapping-API.txt
>> [1]
>>
>> seem chnmap type _FIXED , _VAR and _PAIRED does not fit when LFE and
>> FC can be swapped for internal speaker and external speaker
>
>
> Right, you can't do it with a single map of one of those types.
http://git.alsa-project.org/?p=alsa-utils.git&a=search&h=HEAD&st=commit&s=chmap

do chmap of internal speakers need {FL FR RL RR LFE NA} ?

http://git.alsa-project.org/?p=alsa-lib.git&a=search&h=HEAD&st=commit&s=chmap

as set_chmap() still not yet implemented in pcm_route.c

do speaker-test need to specify channel map when using those odd number
channels ?

speaker-test -D surround21  -c3 -t wav
speaker-test -D surround41  -c5 -t wav -mFL,FR,RL,RR,LFE
speaker-test -D surround50  -c5 -t wav

http://git.alsa-project.org/?p=alsa-utils.git;a=commitdiff;h=7b14c00b56784f69ecc954a2de36e0a058fc8849;hp=000bf230cfb3b0abe88d27701dd77982675126ec

this example seem not working

speaker-test -c2 -t wav -Dplug:front -mFR,FL

>
>
>>
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=0fb87bb474f978446786263deff6263284e6e011
>> [2]
>>
>> How do the driver implement channel map when codec has  swap
>> center/lfe switch ?
>>
>> Do chmap contain both {FL FR RL RR FC LFE} and {FL FR RL RR LFE FC} ?
>
>
> If you want to provide support for userspace doing it both ways, then
yes, you need those two _FIXED maps.

Can chmap contain two _FIXED maps of same number of channels ?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Fwd: Front speakers doesn't work in multichannel output, regression in ALC888
  2015-05-14  6:26                 ` Fwd: " Raymond Yau
@ 2015-05-14  7:45                   ` Anssi Hannula
  2015-05-17  1:49                     ` Raymond Yau
  0 siblings, 1 reply; 16+ messages in thread
From: Anssi Hannula @ 2015-05-14  7:45 UTC (permalink / raw)
  To: Raymond Yau; +Cc: lukasz.wojnilowicz, tiwai, ALSA Development Mailing List

14.05.2015, 09:26, Raymond Yau kirjoitti:
>>>> I started MS Windows and without externals speakers plugged in I
>>>
>>> could test
>>>  > 5.1 configuration and it seemed that sound was coming from
>>> different directions.
>>>
>>>  >
>>>  > What I managed to determine:
>>>  > I've got 3 stacks:
>>>  > 1 ST: Headphone, Line-out (FL and FR), SPDIF
>>>  > 2 ST: Microphone, Line-out (CLFE)
>>>  > 3 ST: Line-in, Line-out (RL and RR)
>>>  >
>>>  > I've got 5 responsive output pins
>>>  > PIN 0x14: Internal FL FR
>>>  > PIN 0x15: External FL FR
>>>  > PIN 0x17: Internal LFE
>>>  > PIN 0x18: External CLFE
>>>  > PIN 0x1a: External RL RR
>>>  >
>>>  > How can we make it work with these information?
> 
> speaker-test -Dhw:0,0 -c6 -t wav
>  
>>>
>>>
>>>
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/Channel-Mapping-API.txt
>>> [1]
>>>
>>> seem chnmap type _FIXED , _VAR and _PAIRED does not fit when LFE and
>>> FC can be swapped for internal speaker and external speaker
>>
>>
>> Right, you can't do it with a single map of one of those types.
> 
> http://git.alsa-project.org/?p=alsa-utils.git&a=search&h=HEAD&st=commit&s=chmap
> 
> do chmap of internal speakers need {FL FR RL RR LFE NA} ?

>From above it looks like there are 3 internal speakers, so I guess e.g.
{FL FR LFE NA} might be in order (or just {FL FR LFE} if 3-channel
playback is supported).

> http://git.alsa-project.org/?p=alsa-lib.git&a=search&h=HEAD&st=commit&s=chmap
> 
> as set_chmap() still not yet implemented in pcm_route.c
> 
> do speaker-test need to specify channel map when using those odd number
> channels ?
> 
> speaker-test -D surround21  -c3 -t wav
> speaker-test -D surround41  -c5 -t wav -mFL,FR,RL,RR,LFE
> speaker-test -D surround50  -c5 -t wav

Well, the driver should provide the correct chmap.

> http://git.alsa-project.org/?p=alsa-utils.git;a=commitdiff;h=7b14c00b56784f69ecc954a2de36e0a058fc8849;hp=000bf230cfb3b0abe88d27701dd77982675126ec
> 
> this example seem not working
> 
> speaker-test -c2 -t wav -Dplug:front -mFR,FL

You are getting an error?
If so, that is expected if the underlying device does not support the
wanted channel map.

>>
>>
>>>
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=0fb87bb474f978446786263deff6263284e6e011
>>> [2]
>>>
>>> How do the driver implement channel map when codec has  swap
>>> center/lfe switch ?
>>>
>>> Do chmap contain both {FL FR RL RR FC LFE} and {FL FR RL RR LFE FC} ?
>>
>>
>> If you want to provide support for userspace doing it both ways, then
> yes, you need those two _FIXED maps.
> 
> Can chmap contain two _FIXED maps of same number of channels ?

Sure.

-- 
Anssi Hannula

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Front speakers doesn't work in multichannel output, regression in ALC888
  2015-05-14  7:45                   ` Anssi Hannula
@ 2015-05-17  1:49                     ` Raymond Yau
  0 siblings, 0 replies; 16+ messages in thread
From: Raymond Yau @ 2015-05-17  1:49 UTC (permalink / raw)
  To: Anssi Hannula
  Cc: tiwai, lukasz.wojnilowicz, ALSA Development Mailing List,
	Vincent Petry, Juan Jesus Garcia de Soria

> >>>> I started MS Windows and without externals speakers plugged in I
> >>>
> >>> could test
> >>>  > 5.1 configuration and it seemed that sound was coming from
> >>> different directions.
> >>>
> >>>  >
> >>>  > What I managed to determine:
> >>>  > I've got 3 stacks:
> >>>  > 1 ST: Headphone, Line-out (FL and FR), SPDIF
> >>>  > 2 ST: Microphone, Line-out (CLFE)
> >>>  > 3 ST: Line-in, Line-out (RL and RR)
> >>>  >
> >>>  > I've got 5 responsive output pins
> >>>  > PIN 0x14: Internal FL FR
> >>>  > PIN 0x15: External FL FR
> >>>  > PIN 0x17: Internal LFE
> >>>  > PIN 0x18: External CLFE
> >>>  > PIN 0x1a: External RL RR
> >>>  >
> >>>  > How can we make it work with these information?

speaker-test -Dhw:0,0 -c4 -t wav

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_realtek.c?id=7cef4cf1c5e9d81554137f52b96a5ab7f6241cdd

You need to notify user of other acer aspire which use quirk
ALC888_ACER_ASPIRE_4930G if you want to remove node 0x16

> >>>
> >>>
> >
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/Channel-Mapping-API.txt
> >>> [1]
> >>>
> >>> seem chnmap type _FIXED , _VAR and _PAIRED does not fit when LFE and
> >>> FC can be swapped for internal speaker and external speaker
> >>
> >>
> >> Right, you can't do it with a single map of one of those types.
> >
> >
http://git.alsa-project.org/?p=alsa-utils.git&a=search&h=HEAD&st=commit&s=chmap
> >
> > do chmap of internal speakers need {FL FR RL RR LFE NA} ?
>
> From above it looks like there are 3 internal speakers, so I guess e.g.
> {FL FR LFE NA} might be in order (or just {FL FR LFE} if 3-channel
> playback is supported).

This is different from 2.1 internal speakers when yours also support
external 5.1

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=f37bc7a88d374448a1f4bba9267d308606d78bf2

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=8e38395360844806041ea69ab9690f5f174bc40c

>
> >
http://git.alsa-project.org/?p=alsa-utils.git;a=commitdiff;h=7b14c00b56784f69ecc954a2de36e0a058fc8849;hp=000bf230cfb3b0abe88d27701dd77982675126ec
> >
> > this example seem not working
> >
> > speaker-test -c2 -t wav -Dplug:front -mFR,FL
>
> You are getting an error?

Unable to set channel map

> If so, that is expected if the underlying device does not support the
> wanted channel map.
>

Seem only those idt codecs which wcaps support R/L swap but hda-intel use
snd_pcm_std_chmap

Are there any other sound card support swap front right and front left ?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [alsa-devel] Front speakers doesn't work in multichannel output, regression in ALC888
  2015-05-02  5:42 Front speakers doesn't work in multichannel output, regression in ALC888 Łukasz Wojniłowicz
                   ` (2 preceding siblings ...)
       [not found] ` <29807127.PULdKhJLmi@luklap.workgroup>
@ 2015-06-07 12:44 ` Raymond Yau
       [not found] ` <8386507.uauZCcniqC@luklap.workgroup>
  4 siblings, 0 replies; 16+ messages in thread
From: Raymond Yau @ 2015-06-07 12:44 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, pulseaudio-discuss
  Cc: ALSA Development Mailing List


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

>
> My problem is that when I set channel output to "Analog output surround
5.1"
> (or 2.1 or 4.1), I hear no sound in front speakers, but in case of 5.1 or
4.1
> I can hear sound in rear speakers. I use kernel 3.19.5 and it didn't
happen in
> earlier kernels that is 3.18 and in 3.17 for sure.
>
> My configuration is:
> OS: Fedora 21 64 bit
> SoundCard: ALC888
> Model name: acer-aspire-4930g
> Laptop: Acer Aspire 5930g
> Speakers: external 5.1 with 3 jacks
> Sound channel configuration module is standard configuration module from
KDE.
>
> Additional info:
> 1) When channel output is 5.1 and I unplug green jack and leave two others
> jacks connected then I can hear sound in laptop internal speakers.
> 2) Earlier (kernel 3.18 and 3.17) I didn't have possibility to choose 2.1
> configuration and additionally to 4.1 configuration I could also choose
4.0
> configuration.

You have to provide pulseaudio verbose log

If driver create channel mode which allow you to support surround5.1 with
your headphone,  line in and mic jack

It is possible for pulseaudio mute two of your external 5.1 speaker when
headphone jack is plugged

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-headphones.conf

[Element Rear]
switch = off
volume = off

[Element Surround]
switch = off
volume = off

[Element Center]
switch = off
volume = off

[Element LFE]
switch = off
volume = off

[-- Attachment #1.2: Type: text/html, Size: 1836 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Fwd: [alsa-devel] Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]     ` <5853893.pVbPai8A2z@luklap.workgroup>
@ 2015-06-09  2:23       ` Raymond Yau
       [not found]       ` <CAN8ccib5rgh2UjNG9isbAkTgMM7MhwL+FMxdd-4Z79Qng5hRNA@mail.gmail.com>
  1 sibling, 0 replies; 16+ messages in thread
From: Raymond Yau @ 2015-06-09  2:23 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, ALSA Development Mailing List,
	pulseaudio-discuss


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

> > > No change.
> > >
http://www.alsa-project.org/db/?f=30b3f0087374b914a20dbe20a618fb892a5d6fd5
> >
> > Are there any  offical specificaion ?
> >
> > So far most review only mention stereo speakers and subwoofer, the
service
> > guide only show how to replace two internal speakers
>
> Service manual mentions
>  "Dolby®-certified surround sound system with two built-in stereo
speakers and
> one subwoofer supporting low-frequency effects"
>
> so all additional channels what I'm hearing in Windows is emulated. I hope
> that it is clear now that my laptop has two internal speakers and one
> subwoofer.
>

You have to determine which node 0x16 or 0x17 is your subwoofer and remove
the redundant speaker pin fixup

>Thanks. I know how to help myself, but I expected it by default. I wonder
how > many other users will manage to get their sound working good as
before > regression. > And wasn't "model=acer-aspire-4930g" some sort of
early patching which was > thrown out of official code?

After remove the redundant internal speaker, 5.1 is only available after
you change the channel mode

Can  alsactl restore the channel mode before pulseaudio probe the sound
cards ?

Auto mic select is not enabled when the notebook has mic jack and line in
jack , internl mic

As jack retasking is specific to snd-hda-intel and some multi cjannel ac97
codecs

It is not easy to force pulseaudio to stop all client connection, reprobe
the profiles on board audio after jack retasking

hdajackretask also perform the same function
stop pulseaudio and using dynamic reconfiguration/early patching

For those notebook with headphone spdif combo jack, it need a customised
iec958.conf and you can use headphone jack to make iec958 unavailable

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/iec958-stereo-output.conf

[Jack Headphone]
state.plugged = no
state.unplugged = unknown

[-- Attachment #1.2: Type: text/html, Size: 2431 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Fwd: Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]         ` <CAN8cciY=bSpebNXqzYc+Q+MDd9Gr3+KGnpS0GBQpES+-XTY0Dw@mail.gmail.com>
@ 2015-06-09  4:03           ` Raymond Yau
       [not found]             ` <31911886.6mcodbBrA7@luklap.workgroup>
  0 siblings, 1 reply; 16+ messages in thread
From: Raymond Yau @ 2015-06-09  4:03 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, ALSA Development Mailing List

> > >
> > > No change.
> > >
http://www.alsa-project.org/db/?f=30b3f0087374b914a20dbe20a618fb892a5d6fd5
> >
> > Are there any  offical specificaion ?
> >
> > So far most review only mention stereo speakers and subwoofer, the
service
> > guide only show how to replace two internal speakers
>
> Service manual mentions
>  "Dolby®-certified surround sound system with two built-in stereo
speakers and
> one subwoofer supporting low-frequency effects"
>
> so all additional channels what I'm hearing in Windows is emulated. I hope
> that it is clear now that my laptop has two internal speakers and one
> subwoofer.
>
>

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=8e38395360844806041ea69ab9690f5f174bc40c

You need to define your 2.1 chmap if the subwoofer only use left channel

Compiling and running PulseAudio from git

http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Fwd: Front speakers doesn't work in multichannel output, regression in ALC888
       [not found]             ` <31911886.6mcodbBrA7@luklap.workgroup>
@ 2015-07-11  1:18               ` Raymond Yau
  0 siblings, 0 replies; 16+ messages in thread
From: Raymond Yau @ 2015-07-11  1:18 UTC (permalink / raw)
  To: Łukasz Wojniłowicz, ALSA Development Mailing List

> >
> >
http://www.alsa-project.org/db/?f=30b3f0087374b914a20dbe20a618fb892a5d6fd5
> >
> > > > Are there any  offical specificaion ?
> > > >
> > > > So far most review only mention stereo speakers and subwoofer, the
> >
> > service
> >
> > > > guide only show how to replace two internal speakers
> > >
> > > Service manual mentions
> > >
> > >  "Dolby®-certified surround sound system with two built-in stereo
> >
> > speakers and
> >
> > > one subwoofer supporting low-frequency effects"
> > >
> > > so all additional channels what I'm hearing in Windows is emulated. I
hope
> > > that it is clear now that my laptop has two internal speakers and one
> > > subwoofer.
> >
> >
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pc
> > i/hda?id=8e38395360844806041ea69ab9690f5f174bc40c
> >
> > You need to define your 2.1 chmap if the subwoofer only use left channel
> >
> > Compiling and running PulseAudio from git
> >
> > http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/
>
> In Fedora 22 workaround with setting "Line out (front)" for 0x15 pin
doesn't
> work.
>
> Sound on my system is totally fucked up.

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-lineout.conf

Are you sure that it is alsa driver bug since pulseaudio seem not using
line out jack to mute internal speakers ?


by adding new hint alt_config , you can use alt_config to select different
set of pin config


diff --git a/sound/pci/hda/hda_auto_parser.c
b/sound/pci/hda/hda_auto_parser.c
index 03b7399..683a0ab 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -952,6 +952,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
     const struct snd_pci_quirk *q;
     int id = HDA_FIXUP_ID_NOT_SET;
     const char *name = NULL;
+    int i;

     if (codec->fixup_id != HDA_FIXUP_ID_NOT_SET)
         return;
@@ -966,6 +967,9 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
         return;
     }

+    if (!snd_hda_get_int_hint(codec, "alt_config", &i))
+        codec->alt_config = i;
+
     if (codec->modelname && models) {
         while (models->name) {
             if (!strcmp(codec->modelname, models->name)) {
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8e02cdf..f406835 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1914,6 +1914,31 @@ static void alc889_fixup_mba21_vref(struct hda_codec
*codec,
         alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
 }

+static void alc888_fixup_acer_aspire_4930g(struct hda_codec *codec,
+                    const struct hda_fixup *fix, int action)
+{
+    struct hda_pintbl subwoofer_config[] = {
+        { 0x16, 0x90170111 }, /* internal subwoofer */
+        {}
+    };
+    struct hda_pintbl alt_config[] = {
+        { 0x15, 0x02014010},
+        { 0x1a, 0x02014011},
+        { 0x18, 0x02014012},
+        {}
+    };
+    snd_hda_apply_pincfgs(codec, subwoofer_config);
+    switch(codec->alt_config){
+    case 1:
+        codec_info(codec, "5.1 External Speaker\n");
+        snd_hda_apply_pincfgs(codec, alt_config);
+        break;
+    default:
+        codec_info(codec, "use [Hint]\nalt_config=1 for 5.1 External
Speaker\n");
+        break;
+    }
+}
+
 /* Don't take HP output as primary
  * Strangely, the speaker output doesn't work on Vaio Z and some Vaio
  * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
@@ -2048,12 +2073,8 @@ static const struct hda_fixup alc882_fixups[] = {
         .v.func = alc889_fixup_coef,
     },
     [ALC882_FIXUP_ACER_ASPIRE_4930G] = {
-        .type = HDA_FIXUP_PINS,
-        .v.pins = (const struct hda_pintbl[]) {
-            { 0x16, 0x99130111 }, /* CLFE speaker */
-            { 0x17, 0x99130112 }, /* surround speaker */
-            { }
-        },
+        .type = HDA_FIXUP_FUNC,
+        .v.func = alc888_fixup_acer_aspire_4930g,
         .chained = true,
         .chain_id = ALC882_FIXUP_GPIO1,
     },
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-07-11  1:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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       ` [alsa-devel] " Raymond Yau
2015-06-07 12:44 ` 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

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.