[alsa-devel] [PATCH 1/3] ASoC: Convert WM8962 MICBIAS to a supply widget
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;
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" }, };
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[] = {
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
participants (2)
-
Mark Brown
-
Pierre-Louis Bossart