All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
@ 2010-10-14  5:06 David Henningsson
  2010-10-14  6:13 ` Valentine Sinitsyn
  2010-10-14  8:10 ` Takashi Iwai
  0 siblings, 2 replies; 11+ messages in thread
From: David Henningsson @ 2010-10-14  5:06 UTC (permalink / raw)
  To: Takashi Iwai, ALSA Development Mailing List; +Cc: crimsun

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

BugLink: https://bugs.launchpad.net/bugs/656625

Add clause for handling Acer Aspire 8943G's subwoofer as additional
speaker pin for automuting.

Reported-by: RussianNeuroMancer
Cc: stable@kernel.org
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

[-- Attachment #2: 0001-ALSA-hda-Add-speaker-pin-to-automute-Acer-Aspire-894.patch --]
[-- Type: text/x-patch, Size: 1642 bytes --]

>From 6491325b75dcfbd1c9db212fd6d653783b626e4d Mon Sep 17 00:00:00 2001
From: Daniel T Chen <crimsun@ubuntu.com>
Date: Sun, 10 Oct 2010 22:39:28 -0400
Subject: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G

BugLink: https://bugs.launchpad.net/bugs/656625

Add clause for handling Acer Aspire 8943G's subwoofer as additional
speaker pin for automuting.

Reported-by: RussianNeuroMancer
Cc: stable@kernel.org
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 sound/pci/hda/patch_realtek.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b4e0959..c41ac30 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -19233,10 +19233,17 @@ static void alc662_auto_init(struct hda_codec *codec)
 }
 
 enum {
+	ALC662_FIXUP_ASPIRE,
 	ALC662_FIXUP_IDEAPAD,
 };
 
 static const struct alc_fixup alc662_fixups[] = {
+	[ALC662_FIXUP_ASPIRE] = {
+		.pins = (const struct alc_pincfg[]) {
+			{ 0x15, 0x99130112 }, /* subwoofer */
+			{ }
+		}
+	},
 	[ALC662_FIXUP_IDEAPAD] = {
 		.pins = (const struct alc_pincfg[]) {
 			{ 0x17, 0x99130112 }, /* subwoofer */
@@ -19246,6 +19253,7 @@ static const struct alc_fixup alc662_fixups[] = {
 };
 
 static struct snd_pci_quirk alc662_fixup_tbl[] = {
+	SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
 	SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
 	SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
 	{}
-- 
1.7.0.4


[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  5:06 [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G David Henningsson
@ 2010-10-14  6:13 ` Valentine Sinitsyn
  2010-10-14  6:22   ` Raymond Yau
                     ` (2 more replies)
  2010-10-14  8:10 ` Takashi Iwai
  1 sibling, 3 replies; 11+ messages in thread
From: Valentine Sinitsyn @ 2010-10-14  6:13 UTC (permalink / raw)
  To: David Henningsson; +Cc: ALSA Development Mailing List

Hi David,

First of all, thank you for your work on subwoofer issues. I've had a 
chance to test them on my system lately, and they do really fix the bug 
reported, but another one (more serious, in my opinion) remains: 
subwoofer is not muted via normal mute button (more precisely, by muting 
Master ALSA mixer). The problem is that during autoconfiguration 
procedure, subwoofer is mapped on PCM channel, and there seems (at least 
to me) to be no reliable way to distinguish subwoofer from other 
possibly existing outputs on a general system and change this behavior. 
Creating dedicated presets for the machines with a subwoofer seems to be 
right way to workaround this, but then _quirks you've implemented should 
be merged with this preset.

Does this sound reasonable to you or I am missing anything?

Thanks.

Regards,
Valentine Sinitsyn

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  6:13 ` Valentine Sinitsyn
@ 2010-10-14  6:22   ` Raymond Yau
  2010-10-14  6:38     ` Valentine Sinitsyn
  2010-10-14  7:49   ` David Henningsson
  2010-10-16  7:06   ` Raymond Yau
  2 siblings, 1 reply; 11+ messages in thread
From: Raymond Yau @ 2010-10-14  6:22 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/10/14 Valentine Sinitsyn <valentine.sinitsyn@gmail.com>

> Hi David,
>
> First of all, thank you for your work on subwoofer issues. I've had a
> chance to test them on my system lately, and they do really fix the bug
> reported, but another one (more serious, in my opinion) remains:
> subwoofer is not muted via normal mute button (more precisely, by muting
> Master ALSA mixer). The problem is that during autoconfiguration
> procedure, subwoofer is mapped on PCM channel, and there seems (at least
> to me) to be no reliable way to distinguish subwoofer from other
> possibly existing outputs on a general system and change this behavior.
> Creating dedicated presets for the machines with a subwoofer seems to be
> right way to workaround this, but then _quirks you've implemented should
> be merged with this preset.
>
> Does this sound reasonable to you or I am missing anything?
>
> Thanks.
>

Do you mean that you want to add that "subwoofer" control which is connected
the the master mono pin of the codec  to the slave controls of the virtual
master volume control ?

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  6:22   ` Raymond Yau
@ 2010-10-14  6:38     ` Valentine Sinitsyn
  2010-10-14  8:30       ` Raymond Yau
  0 siblings, 1 reply; 11+ messages in thread
From: Valentine Sinitsyn @ 2010-10-14  6:38 UTC (permalink / raw)
  To: Raymond Yau; +Cc: ALSA Development Mailing List

> Do you mean that you want to add that "subwoofer" control which is connected
> the the master mono pin of the codec  to the slave controls of the virtual
> master volume control ?
Yes, except "subwoofer" control is to be connected to subwoofer's own 
pin (for instance, 0x17 on Lenovo machines). Subwoofer pins I've seen so 
far have their own output amplifier with mute.

Apart of this, adding presets has usual benefits like giving other 
controls descriptive names (say, "Int. Mic" instead of just "Mic"), but 
obviously it has nothing to do with a subwoofer.

Valentine

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  6:13 ` Valentine Sinitsyn
  2010-10-14  6:22   ` Raymond Yau
@ 2010-10-14  7:49   ` David Henningsson
  2010-10-14  8:33     ` Valentine Sinitsyn
  2010-10-16  7:06   ` Raymond Yau
  2 siblings, 1 reply; 11+ messages in thread
From: David Henningsson @ 2010-10-14  7:49 UTC (permalink / raw)
  To: Valentine Sinitsyn; +Cc: ALSA Development Mailing List

On 2010-10-14 08:13, Valentine Sinitsyn wrote:
> Hi David,
>
> First of all, thank you for your work on subwoofer issues. I've had a
> chance to test them on my system lately, and they do really fix the bug
> reported, but another one (more serious, in my opinion) remains:
> subwoofer is not muted via normal mute button (more precisely, by muting
> Master ALSA mixer). The problem is that during autoconfiguration
> procedure, subwoofer is mapped on PCM channel, and there seems (at least
> to me) to be no reliable way to distinguish subwoofer from other
> possibly existing outputs on a general system and change this behavior.
> Creating dedicated presets for the machines with a subwoofer seems to be
> right way to workaround this, but then _quirks you've implemented should
> be merged with this preset.
>
> Does this sound reasonable to you or I am missing anything?

I would say that advertising this pin correctly to the driver is the 
first step. Trying to make the auto-parser treat this pin better would 
be a second step, separate from this patch. Making a new model (if that 
is what you call a "preset") would work as well, and might be easier for 
this particular case, while improving the auto-parser would be better in 
the long run.

Do you agree?

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  5:06 [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G David Henningsson
  2010-10-14  6:13 ` Valentine Sinitsyn
@ 2010-10-14  8:10 ` Takashi Iwai
  1 sibling, 0 replies; 11+ messages in thread
From: Takashi Iwai @ 2010-10-14  8:10 UTC (permalink / raw)
  To: David Henningsson; +Cc: crimsun, ALSA Development Mailing List

At Thu, 14 Oct 2010 07:06:15 +0200,
David Henningsson wrote:
> 
> BugLink: https://bugs.launchpad.net/bugs/656625
> 
> Add clause for handling Acer Aspire 8943G's subwoofer as additional
> speaker pin for automuting.
> 
> Reported-by: RussianNeuroMancer
> Cc: stable@kernel.org
> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>

Applied now.  Thanks.


Takashi


> -- 
> David Henningsson, Canonical Ltd.
> http://launchpad.net/~diwic
> [2 0001-ALSA-hda-Add-speaker-pin-to-automute-Acer-Aspire-894.patch <text/x-patch (7bit)>]
> >From 6491325b75dcfbd1c9db212fd6d653783b626e4d Mon Sep 17 00:00:00 2001
> From: Daniel T Chen <crimsun@ubuntu.com>
> Date: Sun, 10 Oct 2010 22:39:28 -0400
> Subject: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
> 
> BugLink: https://bugs.launchpad.net/bugs/656625
> 
> Add clause for handling Acer Aspire 8943G's subwoofer as additional
> speaker pin for automuting.
> 
> Reported-by: RussianNeuroMancer
> Cc: stable@kernel.org
> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
> ---
>  sound/pci/hda/patch_realtek.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index b4e0959..c41ac30 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -19233,10 +19233,17 @@ static void alc662_auto_init(struct hda_codec *codec)
>  }
>  
>  enum {
> +	ALC662_FIXUP_ASPIRE,
>  	ALC662_FIXUP_IDEAPAD,
>  };
>  
>  static const struct alc_fixup alc662_fixups[] = {
> +	[ALC662_FIXUP_ASPIRE] = {
> +		.pins = (const struct alc_pincfg[]) {
> +			{ 0x15, 0x99130112 }, /* subwoofer */
> +			{ }
> +		}
> +	},
>  	[ALC662_FIXUP_IDEAPAD] = {
>  		.pins = (const struct alc_pincfg[]) {
>  			{ 0x17, 0x99130112 }, /* subwoofer */
> @@ -19246,6 +19253,7 @@ static const struct alc_fixup alc662_fixups[] = {
>  };
>  
>  static struct snd_pci_quirk alc662_fixup_tbl[] = {
> +	SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
>  	SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
>  	SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
>  	{}
> -- 
> 1.7.0.4
> 

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  6:38     ` Valentine Sinitsyn
@ 2010-10-14  8:30       ` Raymond Yau
  2010-10-14  8:40         ` Valentine Sinitsyn
  0 siblings, 1 reply; 11+ messages in thread
From: Raymond Yau @ 2010-10-14  8:30 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/10/14 Valentine Sinitsyn <valentine.sinitsyn@gmail.com>

> Do you mean that you want to add that "subwoofer" control which is
>> connected
>> the the master mono pin of the codec  to the slave controls of the virtual
>> master volume control ?
>>
> Yes, except "subwoofer" control is to be connected to subwoofer's own pin
> (for instance, 0x17 on Lenovo machines). Subwoofer pins I've seen so far
> have their own output amplifier with mute.
>

There are laptop which has 2.1 speakers which subwoofer is connected to
master mono pin of the STAC codec  , The ".1" subwoofer is most likely the
result of a Low pass filter attached to the mono pin

Seem that your Lenovo are not using ALC670,  it is hard to make any comment
without knowing the output of alsa-info.sh

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  7:49   ` David Henningsson
@ 2010-10-14  8:33     ` Valentine Sinitsyn
  0 siblings, 0 replies; 11+ messages in thread
From: Valentine Sinitsyn @ 2010-10-14  8:33 UTC (permalink / raw)
  To: ALSA Development Mailing List

> I would say that advertising this pin correctly to the driver is the
> first step.
That's true.

> Trying to make the auto-parser treat this pin better would
> be a second step, separate from this patch.
Definitely. But changing autoconfiguration behavior for this particular 
case requires extensive testing to prove that changes made for subwoofer 
code haven't affected any other systems with no subwoofer at all (and I 
don't have enough hardware to do it myself). As I've said, I know no 
reliable way to determine that particular pin is connected to a 
subwoofer - it appears like just another speaker pin.

> Making a new model (if that
> is what you call a "preset") would work as well, and might be easier for
It's not mine :-) The struct to store all model parameters is called 
alc_config_preset. Anyway, I meant this very thing.

> this particular case, while improving the auto-parser would be better in
> the long run.
That's true. In fact, they are not mutually exclusive: adding new models 
will have the benefits I've outlined in the last message, while having 
auto-parser treat subwoofer correctly means broader support for new 
machines.

Valentine

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  8:30       ` Raymond Yau
@ 2010-10-14  8:40         ` Valentine Sinitsyn
  2010-10-14  9:06           ` Raymond Yau
  0 siblings, 1 reply; 11+ messages in thread
From: Valentine Sinitsyn @ 2010-10-14  8:40 UTC (permalink / raw)
  To: Raymond Yau; +Cc: ALSA Development Mailing List

> There are laptop which has 2.1 speakers which subwoofer is connected to
> master mono pin of the STAC codec  , The ".1" subwoofer is most likely the
> result of a Low pass filter attached to the mono pin
Maybe - I'm not pretending I've seen all possible configurations. Since 
the idea I'm discussing is to just add some new models for several 
laptops with subwoffers, ultimately it doesn't matter which pin has the 
subwoofer connected, it just have to be correct pin for a given laptop 
family (0x17 for mine, whatever corresponds to Master Mono for someone 
else's etc).

> Seem that your Lenovo are not using ALC670,
Nope it doesn't. It is Lenovo Y550P with ALC272, and in my system, the 
subwoofer is connected at pin 0x17. I'm not at it at the moment, but I 
can send alsa-info.sh later if it is of any interest.

Valentine.

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  8:40         ` Valentine Sinitsyn
@ 2010-10-14  9:06           ` Raymond Yau
  0 siblings, 0 replies; 11+ messages in thread
From: Raymond Yau @ 2010-10-14  9:06 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/10/14 Valentine Sinitsyn <valentine.sinitsyn@gmail.com>

> There are laptop which has 2.1 speakers which subwoofer is connected to
>> master mono pin of the STAC codec  , The ".1" subwoofer is most likely the
>> result of a Low pass filter attached to the mono pin
>>
> Maybe - I'm not pretending I've seen all possible configurations. Since the
> idea I'm discussing is to just add some new models for several laptops with
> subwoffers, ultimately it doesn't matter which pin has the subwoofer
> connected, it just have to be correct pin for a given laptop family (0x17
> for mine, whatever corresponds to Master Mono for someone else's etc).


https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5031

The Dell XPS M1710 has 2.1 speakers with volume controls on both stereo
speakers and Subwoofer,

Node 0x11 [Pin Complex] wcaps 0x400104: Mono Amp-Out
  Amp-Out caps: N/A
  Amp-Out vals: [0x00]
  Pincap 0x00000010: OUT
  Pin Default 0x90170311: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x1
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x13

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

* Re: [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G
  2010-10-14  6:13 ` Valentine Sinitsyn
  2010-10-14  6:22   ` Raymond Yau
  2010-10-14  7:49   ` David Henningsson
@ 2010-10-16  7:06   ` Raymond Yau
  2 siblings, 0 replies; 11+ messages in thread
From: Raymond Yau @ 2010-10-16  7:06 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/10/14 Valentine Sinitsyn <valentine.sinitsyn@gmail.com>

> Hi David,
>
> First of all, thank you for your work on subwoofer issues.


it seem that acer aspire 8943g has 5.1 speakers according to acer web site

with five built-in speakers and one subwoofer supporting low-frequency
effects

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5083

alc670 is a 6 channels codec with [Audio Output] at nodes 0x02, 0x03 and
0x04

http://www.alsa-project.org/db/?f=d1c9aaa11903b6b1e2fd87b6d0466157ffdcb6ad


Seem that your Lenovo are not using ALC670,
>
Nope it doesn't. It is Lenovo Y550P with ALC272, and in my system, the
subwoofer is connected at pin 0x17. I'm not at it at the moment, but I can
send alsa-info.sh later if it is of any interest.

 ALC272 is just a four channels codec ,

If you look at the block diagram (page 5) of alc272 datasheet , the mono-out
(Port H) pin 0x17 has no volume control , and it is connected through 0x0f
to [Audio Output] node 0x02.

This is quite different from STAC9200 which has a volume control for the
mono-out widget

The beep-in and the beep generator can connected to 0x0f through [Audio
Mixer] 0x0b
this mean that the driver cannot assume that master-mono must be connected
to a subwoofer.

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

end of thread, other threads:[~2010-10-16  7:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14  5:06 [PATCH] ALSA: hda: Add speaker pin to automute Acer Aspire 8943G David Henningsson
2010-10-14  6:13 ` Valentine Sinitsyn
2010-10-14  6:22   ` Raymond Yau
2010-10-14  6:38     ` Valentine Sinitsyn
2010-10-14  8:30       ` Raymond Yau
2010-10-14  8:40         ` Valentine Sinitsyn
2010-10-14  9:06           ` Raymond Yau
2010-10-14  7:49   ` David Henningsson
2010-10-14  8:33     ` Valentine Sinitsyn
2010-10-16  7:06   ` Raymond Yau
2010-10-14  8:10 ` Takashi Iwai

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.