All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: Convert WM8962 MICBIAS to a supply widget
@ 2011-09-23 15:54 Mark Brown
  2011-09-23 15:54 ` [PATCH 2/3] ASoC: Add support for on-board analogue microphones on Speyside WM8962 Mark Brown
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Mark Brown @ 2011-09-23 15:54 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

A supply widget is generally clearer than a MICBIAS widget and a mic bias
is just a type of supply so use a supply widget for the MICBIAS. This also
avoids confusion with the routing when connected to multiple inputs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8962.c           |    2 +-
 sound/soc/samsung/speyside_wm8962.c |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 8679f06..59b2ad6 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2669,7 +2669,7 @@ SND_SOC_DAPM_INPUT("IN4R"),
 SND_SOC_DAPM_INPUT("Beep"),
 SND_SOC_DAPM_INPUT("DMICDAT"),
 
-SND_SOC_DAPM_MICBIAS("MICBIAS", WM8962_PWR_MGMT_1, 1, 0),
+SND_SOC_DAPM_SUPPLY("MICBIAS", WM8962_PWR_MGMT_1, 1, 0, NULL, 0),
 
 SND_SOC_DAPM_SUPPLY("Class G", WM8962_CHARGE_PUMP_B, 0, 1, NULL, 0),
 SND_SOC_DAPM_SUPPLY("SYSCLK", WM8962_CLOCKING2, 5, 0, sysclk_event,
diff --git a/sound/soc/samsung/speyside_wm8962.c b/sound/soc/samsung/speyside_wm8962.c
index 98b28ea..35539eb 100644
--- a/sound/soc/samsung/speyside_wm8962.c
+++ b/sound/soc/samsung/speyside_wm8962.c
@@ -152,12 +152,12 @@ static struct snd_soc_dapm_route audio_paths[] = {
 	{ "Main Speaker", NULL, "SPKOUTL" },
 	{ "Main Speaker", NULL, "SPKOUTR" },
 
-	{ "MICBIAS", NULL, "Headset Mic" },
-	{ "IN4L", NULL, "MICBIAS" },
-	{ "IN4R", NULL, "MICBIAS" },
+	{ "Headset Mic", NULL, "MICBIAS" },
+	{ "IN4L", NULL, "Headset Mic" },
+	{ "IN4R", NULL, "Headset Mic" },
 
-	{ "MICBIAS", NULL, "DMIC" },
-	{ "DMICDAT", NULL, "MICBIAS" },
+	{ "DMIC", NULL, "MICBIAS" },
+	{ "DMICDAT", NULL, "DMIC" },
 };
 
 static struct snd_soc_jack speyside_wm8962_headset;
-- 
1.7.6.3

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

* [PATCH 2/3] ASoC: Add support for on-board analogue microphones on Speyside WM8962
  2011-09-23 15:54 [PATCH 1/3] ASoC: Convert WM8962 MICBIAS to a supply widget Mark Brown
@ 2011-09-23 15:54 ` Mark Brown
  2011-09-23 15:54 ` [PATCH 3/3] ASoC: Add DMIC control to Speyside WM8962 board Mark Brown
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2011-09-23 15:54 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/samsung/speyside_wm8962.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/sound/soc/samsung/speyside_wm8962.c b/sound/soc/samsung/speyside_wm8962.c
index 35539eb..10c06dc 100644
--- a/sound/soc/samsung/speyside_wm8962.c
+++ b/sound/soc/samsung/speyside_wm8962.c
@@ -141,6 +141,7 @@ static struct snd_soc_dapm_widget widgets[] = {
 	SND_SOC_DAPM_MIC("Headset Mic", NULL),
 
 	SND_SOC_DAPM_MIC("DMIC", NULL),
+	SND_SOC_DAPM_MIC("AMIC", NULL),
 
 	SND_SOC_DAPM_SPK("Main Speaker", NULL),
 };
@@ -156,6 +157,10 @@ static struct snd_soc_dapm_route audio_paths[] = {
 	{ "IN4L", NULL, "Headset Mic" },
 	{ "IN4R", NULL, "Headset Mic" },
 
+	{ "AMIC", NULL, "MICBIAS" },
+	{ "IN1L", NULL, "AMIC" },
+	{ "IN1R", NULL, "AMIC" },
+
 	{ "DMIC", NULL, "MICBIAS" },
 	{ "DMICDAT", NULL, "DMIC" },
 };
-- 
1.7.6.3

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

* [PATCH 3/3] ASoC: Add DMIC control to Speyside WM8962 board
  2011-09-23 15:54 [PATCH 1/3] ASoC: Convert WM8962 MICBIAS to a supply widget Mark Brown
  2011-09-23 15:54 ` [PATCH 2/3] ASoC: Add support for on-board analogue microphones on Speyside WM8962 Mark Brown
@ 2011-09-23 15:54 ` Mark Brown
  2011-09-23 18:46 ` Adding ELD control to alsa-lib hdmi device Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2011-09-23 15:54 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/samsung/speyside_wm8962.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/samsung/speyside_wm8962.c b/sound/soc/samsung/speyside_wm8962.c
index 10c06dc..07b827e 100644
--- a/sound/soc/samsung/speyside_wm8962.c
+++ b/sound/soc/samsung/speyside_wm8962.c
@@ -134,6 +134,7 @@ static struct snd_soc_dai_link speyside_wm8962_dai[] = {
 
 static const struct snd_kcontrol_new controls[] = {
 	SOC_DAPM_PIN_SWITCH("Main Speaker"),
+	SOC_DAPM_PIN_SWITCH("DMIC"),
 };
 
 static struct snd_soc_dapm_widget widgets[] = {
-- 
1.7.6.3

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

* Adding ELD control to alsa-lib hdmi device
  2011-09-23 15:54 [PATCH 1/3] ASoC: Convert WM8962 MICBIAS to a supply widget Mark Brown
  2011-09-23 15:54 ` [PATCH 2/3] ASoC: Add support for on-board analogue microphones on Speyside WM8962 Mark Brown
  2011-09-23 15:54 ` [PATCH 3/3] ASoC: Add DMIC control to Speyside WM8962 board Mark Brown
@ 2011-09-23 18:46 ` Pierre-Louis Bossart
       [not found] ` <000901cc7a21$0a3bea70$1eb3bf50$@bossart@linux.intel.com>
       [not found] ` <4e7cd40f.5558df0a.269f.ffffef98SMTPIN_ADDED@mx.google.com>
  4 siblings, 0 replies; 7+ messages in thread
From: Pierre-Louis Bossart @ 2011-09-23 18:46 UTC (permalink / raw)
  To: alsa-devel

Hi,
Now that I almost done with exposing a read-only ELD control for HDA/HDMI
outputs, I was wondering how to read it from user-land. PulseAudio and
others rely on the 'hdmi' device, and apparently I can't access this new ELD
control, I have to use the 'hw:x,y' details.
I really don't understand much to alsa-lib... Can I expose this new control
through the ALSA configuration files where the hdmi device is defined? Or is
there a way to infer the card and device number actually used by an alsa-lib
plugin? Or do I have to add code to propagate the information from
hardware-level to higher-level plugins?
Thanks for your feedback!
-Pierre 

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

* Re: Adding ELD control to alsa-lib hdmi device
       [not found] ` <000901cc7a21$0a3bea70$1eb3bf50$@bossart@linux.intel.com>
@ 2011-09-25  9:44   ` David Henningsson
  2011-09-26 17:59     ` Pierre-Louis Bossart
  0 siblings, 1 reply; 7+ messages in thread
From: David Henningsson @ 2011-09-25  9:44 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: alsa-devel

On 09/23/2011 08:46 PM, Pierre-Louis Bossart wrote:
> Hi,
> Now that I almost done with exposing a read-only ELD control for HDA/HDMI
> outputs, I was wondering how to read it from user-land. PulseAudio and
> others rely on the 'hdmi' device, and apparently I can't access this new ELD
> control, I have to use the 'hw:x,y' details.

The hdmi:x(,y) device is only used for pcm. For opening the mixer, hw:x 
(never hw:x,y - that's pcm only as well) is used as the device string.

> I really don't understand much to alsa-lib... Can I expose this new control
> through the ALSA configuration files where the hdmi device is defined? Or is
> there a way to infer the card and device number actually used by an alsa-lib
> plugin? Or do I have to add code to propagate the information from
> hardware-level to higher-level plugins?
> Thanks for your feedback!

I'm not the expert here, but if I were you, I would run

amixer -D hw:x contents
amixer -D hw:x scontents

To see if your controls show up there. If it shows up in scontents, that 
would be the "simple" mixer interface that PulseAudio uses. If not, 
using the control api (as being done by "contents") should work.

Anyway, reading the source code to amixer would then be the first step 
towards understanding how to enumerate and read mixer controls.

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

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

* Re: Adding ELD control to alsa-lib hdmi device
       [not found] ` <4e7cd40f.5558df0a.269f.ffffef98SMTPIN_ADDED@mx.google.com>
@ 2011-09-25 13:15   ` Raymond Yau
  0 siblings, 0 replies; 7+ messages in thread
From: Raymond Yau @ 2011-09-25 13:15 UTC (permalink / raw)
  To: ALSA Development Mailing List

2011/9/24 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
> Hi,
> Now that I almost done with exposing a read-only ELD control for HDA/HDMI
> outputs, I was wondering how to read it from user-land. PulseAudio and
> others rely on the 'hdmi' device, and apparently I can't access this new ELD
> control, I have to use the 'hw:x,y' details.

If you are using iface_pcm



http://www.alsa-project.org/alsa-doc/alsa-lib/control_8c.html

CTL interface

use snd_ctl_open() to open "hw:x"


or  use

alsactl store

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

* Re: Adding ELD control to alsa-lib hdmi device
  2011-09-25  9:44   ` David Henningsson
@ 2011-09-26 17:59     ` Pierre-Louis Bossart
  0 siblings, 0 replies; 7+ messages in thread
From: Pierre-Louis Bossart @ 2011-09-26 17:59 UTC (permalink / raw)
  To: David Henningsson; +Cc: alsa-devel


> I'm not the expert here, but if I were you, I would run
> 
> amixer -D hw:x contents
> amixer -D hw:x scontents
> 
> To see if your controls show up there. If it shows up in scontents, that 
> would be the "simple" mixer interface that PulseAudio uses. If not, 
> using the control api (as being done by "contents") should work.
> 
> Anyway, reading the source code to amixer would then be the first step 
> towards understanding how to enumerate and read mixer controls.

That part was done already. I was looking at PulseAudio integration. By
looking at additional source code, I found out I could retrieve the card
and device number with snd_pcm_info_get_card() and
snd_pcm_info_get_device(). 
I can now read the ELD control from PulseAudio, all I need is to add the
ELD parsing and set the codecs supported by the receiver accordingly.
-Pierre

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

end of thread, other threads:[~2011-09-26 18:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-23 15:54 [PATCH 1/3] ASoC: Convert WM8962 MICBIAS to a supply widget Mark Brown
2011-09-23 15:54 ` [PATCH 2/3] ASoC: Add support for on-board analogue microphones on Speyside WM8962 Mark Brown
2011-09-23 15:54 ` [PATCH 3/3] ASoC: Add DMIC control to Speyside WM8962 board Mark Brown
2011-09-23 18:46 ` Adding ELD control to alsa-lib hdmi device Pierre-Louis Bossart
     [not found] ` <000901cc7a21$0a3bea70$1eb3bf50$@bossart@linux.intel.com>
2011-09-25  9:44   ` David Henningsson
2011-09-26 17:59     ` Pierre-Louis Bossart
     [not found] ` <4e7cd40f.5558df0a.269f.ffffef98SMTPIN_ADDED@mx.google.com>
2011-09-25 13:15   ` 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.