All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] WM9705 tweak
@ 2009-01-19 13:24 Ian Molton
  2009-01-19 13:36 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Molton @ 2009-01-19 13:24 UTC (permalink / raw)
  To: ALSA development, Takashi Iwai, Mark Brown

Hi folks,

Just a little patch to make recording work properly on wm9705  (the mute 
is hidden on alsamixer otherwise. (that and the control was poorly named).

-Ian

 From 47fa5f6a17ff9a7e546c7fae84b0a9c0b97bc74d Mon Sep 17 00:00:00 2001
From: Ian Molton <ian@mnementh.co.uk>
Date: Mon, 19 Jan 2009 12:46:54 +0000
Subject: [PATCH] ASoC: codec: WM9705 Fix capture switch name

This patch fixes the acpture switch name so that it shows up in alsamixer.

Without this, its not possible to unmute the capture PGA.

Signed-off-by: Ian Molton <iann@mnementh.co.uk>
---
  sound/soc/codecs/wm9705.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c
index cb26b6a..01bfd5d 100644
--- a/sound/soc/codecs/wm9705.c
+++ b/sound/soc/codecs/wm9705.c
@@ -57,8 +57,8 @@ static const struct snd_kcontrol_new 
wm9705_snd_ac97_controls[] = {
  	SOC_DOUBLE("CD Playback Volume", AC97_CD, 8, 0, 31, 1),
  	SOC_SINGLE("Mic Playback Volume", AC97_MIC, 0, 31, 1),
  	SOC_SINGLE("Mic 20dB Boost Switch", AC97_MIC, 6, 1, 0),
-	SOC_DOUBLE("PCM Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0),
-	SOC_SINGLE("PCM Capture Switch", AC97_REC_GAIN, 15, 1, 1),
+	SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0),
+	SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1),
  };

  static const char *wm9705_mic[] = {"Mic 1", "Mic 2"};
-- 
1.5.6.5

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

* Re: [Patch] WM9705 tweak
  2009-01-19 13:24 [Patch] WM9705 tweak Ian Molton
@ 2009-01-19 13:36 ` Mark Brown
  2009-01-19 15:33   ` Ian Molton
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2009-01-19 13:36 UTC (permalink / raw)
  To: Ian Molton; +Cc: Takashi Iwai, ALSA development

On Mon, Jan 19, 2009 at 01:24:30PM +0000, Ian Molton wrote:

> From 47fa5f6a17ff9a7e546c7fae84b0a9c0b97bc74d Mon Sep 17 00:00:00 2001
> From: Ian Molton <ian@mnementh.co.uk>
> Date: Mon, 19 Jan 2009 12:46:54 +0000
> Subject: [PATCH] ASoC: codec: WM9705 Fix capture switch name

> This patch fixes the acpture switch name so that it shows up in alsamixer.

Are you absolutely sure that it doesn't get displayed at all?  Note that
the default display for alsamixer only shows controls it thinks are
playback controls, you need to use tab to change the view to show other
controls.

> -	SOC_DOUBLE("PCM Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0),
> -	SOC_SINGLE("PCM Capture Switch", AC97_REC_GAIN, 15, 1, 1),
> +	SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0),
> +	SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1),

I'd expect the two control names to still match up...

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

* Re: [Patch] WM9705 tweak
  2009-01-19 13:36 ` Mark Brown
@ 2009-01-19 15:33   ` Ian Molton
  2009-01-19 15:55     ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Molton @ 2009-01-19 15:33 UTC (permalink / raw)
  To: Mark Brown; +Cc: Takashi Iwai, ALSA development

Mark Brown wrote:
> On Mon, Jan 19, 2009 at 01:24:30PM +0000, Ian Molton wrote:
> 
>> From 47fa5f6a17ff9a7e546c7fae84b0a9c0b97bc74d Mon Sep 17 00:00:00
>> 2001 From: Ian Molton <ian@mnementh.co.uk> Date: Mon, 19 Jan 2009
>> 12:46:54 +0000 Subject: [PATCH] ASoC: codec: WM9705 Fix capture
>> switch name
> 
>> This patch fixes the acpture switch name so that it shows up in
alsamixer.
> 
> Are you absolutely sure that it doesn't get displayed at all?  Note
> that the default display for alsamixer only shows controls it thinks
> are playback controls, you need to use tab to change the view to show
> other controls.

I cant find the switch. I can see the capture control under the capture
tab, but its mute isnt there.

>> -	SOC_DOUBLE("PCM Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0), -
>> SOC_SINGLE("PCM Capture Switch", AC97_REC_GAIN, 15, 1, 1), +
>> SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0), +
>> SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1),
> 
> I'd expect the two control names to still match up...

I can only see the capture volume slider without this patch. the spot in 
alsa mixer under the slider where one would expect to find a mute just 
has <> in it.

WM9712 seems to do similar too.

-Ian

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

* Re: [Patch] WM9705 tweak
  2009-01-19 15:33   ` Ian Molton
@ 2009-01-19 15:55     ` Mark Brown
  2009-01-19 17:23       ` Ian Molton
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2009-01-19 15:55 UTC (permalink / raw)
  To: Ian Molton; +Cc: Takashi Iwai, ALSA development

On Mon, Jan 19, 2009 at 03:33:00PM +0000, Ian Molton wrote:
> Mark Brown wrote:

> >Are you absolutely sure that it doesn't get displayed at all?  Note
> >that the default display for alsamixer only shows controls it thinks
> >are playback controls, you need to use tab to change the view to show
> >other controls.

> I cant find the switch. I can see the capture control under the capture
> tab, but its mute isnt there.

I'm testing this with the WM9713 (which has "Capture Volume" and
"Capture Switch") and the control is visible.  It is presented
differently (as a capture facility switch which is toggled using space
rather than as a mute) but it's there.

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

* Re: [Patch] WM9705 tweak
  2009-01-19 15:55     ` Mark Brown
@ 2009-01-19 17:23       ` Ian Molton
  2009-01-19 17:26         ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Molton @ 2009-01-19 17:23 UTC (permalink / raw)
  To: Mark Brown; +Cc: Takashi Iwai, ALSA development

Mark Brown wrote:

> I'm testing this with the WM9713 (which has "Capture Volume" and
> "Capture Switch") and the control is visible.  It is presented
> differently (as a capture facility switch which is toggled using space
> rather than as a mute) but it's there.

Quite correct.  I just checked and it works as you say. I never knew 
alsamixer behaved like that. How unintuitive!

Would this patch be acceptable this late in the game? The control is 
still not very well named, despite not being broken :-)

-Ian

 From 3781e5184da68791d16e7403c748d9e39a68a565 Mon Sep 17 00:00:00 2001
From: Ian Molton <ian@mnementh.co.uk>
Date: Mon, 19 Jan 2009 12:46:54 +0000
Subject: [PATCH] ASoC: codec: WM9705 Fix capture switch name

This patch fixes the acpture switch name so that it better reflects its 
purpose.

Signed-off-by: Ian Molton <iann@mnementh.co.uk>
---
  sound/soc/codecs/wm9705.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c
index cb26b6a..5e1937a 100644
--- a/sound/soc/codecs/wm9705.c
+++ b/sound/soc/codecs/wm9705.c
@@ -57,8 +57,8 @@ static const struct snd_kcontrol_new 
wm9705_snd_ac97_controls[] = {
  	SOC_DOUBLE("CD Playback Volume", AC97_CD, 8, 0, 31, 1),
  	SOC_SINGLE("Mic Playback Volume", AC97_MIC, 0, 31, 1),
  	SOC_SINGLE("Mic 20dB Boost Switch", AC97_MIC, 6, 1, 0),
-	SOC_DOUBLE("PCM Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0),
-	SOC_SINGLE("PCM Capture Switch", AC97_REC_GAIN, 15, 1, 1),
+	SOC_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0),
+	SOC_SINGLE("Capture Switch", AC97_REC_GAIN, 15, 1, 1),
  };

  static const char *wm9705_mic[] = {"Mic 1", "Mic 2"};
-- 
1.5.6.5

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

* Re: [Patch] WM9705 tweak
  2009-01-19 17:23       ` Ian Molton
@ 2009-01-19 17:26         ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2009-01-19 17:26 UTC (permalink / raw)
  To: Ian Molton; +Cc: Takashi Iwai, ALSA development

On Mon, Jan 19, 2009 at 05:23:11PM +0000, Ian Molton wrote:

> Would this patch be acceptable this late in the game? The control is 
> still not very well named, despite not being broken :-)

Yes, that's fine - I'll apply it.  It was only the split of the two
control names that I was querying.  Thanks!

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

end of thread, other threads:[~2009-01-19 17:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 13:24 [Patch] WM9705 tweak Ian Molton
2009-01-19 13:36 ` Mark Brown
2009-01-19 15:33   ` Ian Molton
2009-01-19 15:55     ` Mark Brown
2009-01-19 17:23       ` Ian Molton
2009-01-19 17:26         ` Mark Brown

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.