[alsa-devel] [PATCH v2 0/3] Expose more controls from tegra-max98090
v2: * Added ack tags from Stephen
Hello,
we need some more controls in userspace so policy can be applied at events such as microphone and headphone jacks being plugged in, to be used by Tegra-based Chromebooks.
Regards,
Tomeu
Tomeu Vizoso (3): ASoC: tegra: Expose Headphones pin to userspace ASoC: tegra: Add sink for the internal mic to tegra_max98090 ASoC: tegra: Add control for the Mic Jack pin
.../devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt | 1 + sound/soc/tegra/tegra_max98090.c | 4 ++++ 2 files changed, 5 insertions(+)
So userspace can enable or disable it based on the current policy.
Signed-off-by: Tomeu Vizoso tomeu.vizoso@collabora.com Acked-by: Stephen Warren swarren@nvidia.com --- sound/soc/tegra/tegra_max98090.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index af3fb99..8df71a4 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c @@ -136,6 +136,7 @@ static const struct snd_soc_dapm_widget tegra_max98090_dapm_widgets[] = { };
static const struct snd_kcontrol_new tegra_max98090_controls[] = { + SOC_DAPM_PIN_SWITCH("Headphones"), SOC_DAPM_PIN_SWITCH("Speakers"), };
Also adds a control for the pin of the internal mic, so userspace can apply policy when the state of the external mic jack changes.
Signed-off-by: Tomeu Vizoso tomeu.vizoso@collabora.com Acked-by: Stephen Warren swarren@nvidia.com --- Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt | 1 + sound/soc/tegra/tegra_max98090.c | 2 ++ 2 files changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt index c949abc..c3495be 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt @@ -18,6 +18,7 @@ Required properties: * Headphones * Speakers * Mic Jack + * Int Mic
- nvidia,i2s-controller : The phandle of the Tegra I2S controller that's connected to the CODEC. diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index 8df71a4..29ea87c 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c @@ -133,11 +133,13 @@ static const struct snd_soc_dapm_widget tegra_max98090_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphones", NULL), SND_SOC_DAPM_SPK("Speakers", NULL), SND_SOC_DAPM_MIC("Mic Jack", NULL), + SND_SOC_DAPM_MIC("Int Mic", NULL), };
static const struct snd_kcontrol_new tegra_max98090_controls[] = { SOC_DAPM_PIN_SWITCH("Headphones"), SOC_DAPM_PIN_SWITCH("Speakers"), + SOC_DAPM_PIN_SWITCH("Int Mic"), };
static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd)
So userspace can enable and disable the external microphone.
Signed-off-by: Tomeu Vizoso tomeu.vizoso@collabora.com Acked-by: Stephen Warren swarren@nvidia.com --- sound/soc/tegra/tegra_max98090.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index 29ea87c..1f20c2c 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c @@ -139,6 +139,7 @@ static const struct snd_soc_dapm_widget tegra_max98090_dapm_widgets[] = { static const struct snd_kcontrol_new tegra_max98090_controls[] = { SOC_DAPM_PIN_SWITCH("Headphones"), SOC_DAPM_PIN_SWITCH("Speakers"), + SOC_DAPM_PIN_SWITCH("Mic Jack"), SOC_DAPM_PIN_SWITCH("Int Mic"), };
On Thu, Feb 12, 2015 at 09:41:54AM +0100, Tomeu Vizoso wrote:
v2: * Added ack tags from Stephen
Hello,
we need some more controls in userspace so policy can be applied at events such as microphone and headphone jacks being plugged in, to be used by Tegra-based Chromebooks.
Applied all, thanks.
participants (2)
-
Mark Brown
-
Tomeu Vizoso