ASoC: Convert WM8962 MICBIAS to a supply widget
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.
--- sound/soc/codecs/wm8962.c | 2 +- sound/soc/samsung/speyside_wm8962.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/wm8962.c +1 -1
@@ -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,
sound/soc/samsung/speyside_wm8962.c +5 -5
@@ -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;
Signature · 1 line
1.7.6.3
PATCH 2/3 ASoC: Add support for on-board analogue microphones on Speyside WM8962
--- sound/soc/samsung/speyside_wm8962.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
sound/soc/samsung/speyside_wm8962.c +5 -0
@@ -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" }, };
Signature · 1 line
1.7.6.3
PATCH 3/3 ASoC: Add DMIC control to Speyside WM8962 board
In reply to Mark Brown--- sound/soc/samsung/speyside_wm8962.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/samsung/speyside_wm8962.c +1 -0
@@ -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[] = {
Signature · 1 line
1.7.6.3
Adding ELD control to alsa-lib hdmi device
In reply to Mark BrownHi,
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
A message that is not in the archive (sent off-list or not yet received): 000901cc7a21$0a3bea70$1eb3bf50$@[email protected]
Re: Adding ELD control to alsa-lib hdmi device
Quoted 5 lines · Pierre-Louis Bossart
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.
Quoted 6 lines
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.
Signature · 2 lines
David Henningsson, Canonical Ltd. http://launchpad.net/~diwic
Re: Adding ELD control to alsa-lib hdmi device
Quoted 6 lines
I'm not the expert here, but if I were you, I would run
amixer -D hw:x contents
amixer -D hw:x scontents
Quoted 6 lines
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Adding ELD control to alsa-lib hdmi device
2011/9/24 Pierre-Louis Bossart <[email protected]>:
Quoted 5 lines
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