From f9b4243fc2e0be109b957a0a5a25968facf7565d Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 16 Jul 2013 17:00:27 +0100 Subject: ASoC: tegra: Remove unneeded mach-type.h incldues Signed-off-by: Mark Brown Acked-by: Stephen Warren Tested-by: Stephen Warren --- sound/soc/tegra/tegra_alc5632.c | 2 -- sound/soc/tegra/tegra_wm8753.c | 2 -- sound/soc/tegra/trimslice.c | 2 -- 3 files changed, 6 deletions(-) (limited to 'sound') diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c index 48d05d9e1002..c61ea3a1030f 100644 --- a/sound/soc/tegra/tegra_alc5632.c +++ b/sound/soc/tegra/tegra_alc5632.c @@ -13,8 +13,6 @@ * published by the Free Software Foundation. */ -#include - #include #include #include diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c index f87fc53e9b8c..8e774d1a243c 100644 --- a/sound/soc/tegra/tegra_wm8753.c +++ b/sound/soc/tegra/tegra_wm8753.c @@ -28,8 +28,6 @@ * */ -#include - #include #include #include diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c index 05c68aab5cf0..734bfcd21148 100644 --- a/sound/soc/tegra/trimslice.c +++ b/sound/soc/tegra/trimslice.c @@ -24,8 +24,6 @@ * */ -#include - #include #include #include -- cgit v1.2.3 From 2fa1b9008c73525bbd7de93bf36e406b8a754bd1 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 16 Jul 2013 18:49:09 +0100 Subject: ASoC: tegra: Add GPIOLIB dependencies For build coverage. Signed-off-by: Mark Brown Acked-by: Stephen Warren --- sound/soc/tegra/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sound') diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig index 995b120c2cd0..b0c8ecf8101b 100644 --- a/sound/soc/tegra/Kconfig +++ b/sound/soc/tegra/Kconfig @@ -61,7 +61,7 @@ config SND_SOC_TEGRA30_I2S config SND_SOC_TEGRA_RT5640 tristate "SoC Audio support for Tegra boards using an RT5640 codec" - depends on SND_SOC_TEGRA && I2C + depends on SND_SOC_TEGRA && I2C && GPIOLIB select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC select SND_SOC_RT5640 @@ -71,7 +71,7 @@ config SND_SOC_TEGRA_RT5640 config SND_SOC_TEGRA_WM8753 tristate "SoC Audio support for Tegra boards using a WM8753 codec" - depends on SND_SOC_TEGRA && I2C + depends on SND_SOC_TEGRA && I2C && GPIOLIB select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC select SND_SOC_WM8753 @@ -81,7 +81,7 @@ config SND_SOC_TEGRA_WM8753 config SND_SOC_TEGRA_WM8903 tristate "SoC Audio support for Tegra boards using a WM8903 codec" - depends on SND_SOC_TEGRA && I2C + depends on SND_SOC_TEGRA && I2C && GPIOLIB select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC select SND_SOC_WM8903 @@ -92,7 +92,7 @@ config SND_SOC_TEGRA_WM8903 config SND_SOC_TEGRA_WM9712 tristate "SoC Audio support for Tegra boards using a WM9712 codec" - depends on SND_SOC_TEGRA && ARCH_TEGRA_2x_SOC + depends on SND_SOC_TEGRA && ARCH_TEGRA_2x_SOC && GPIOLIB select SND_SOC_TEGRA20_AC97 select SND_SOC_WM9712 help @@ -110,7 +110,7 @@ config SND_SOC_TEGRA_TRIMSLICE config SND_SOC_TEGRA_ALC5632 tristate "SoC Audio support for Tegra boards using an ALC5632 codec" - depends on SND_SOC_TEGRA && I2C + depends on SND_SOC_TEGRA && I2C && GPIOLIB select SND_SOC_TEGRA20_I2S if ARCH_TEGRA_2x_SOC select SND_SOC_ALC5632 help -- cgit v1.2.3 From 2086d078359f0fa512543404f772fc0615da385a Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 17 Jul 2013 10:18:33 +0100 Subject: ASoC: tegra: Always use the generic dmaengine helper library The usage of the dmaengine helpers is unconditional, especially when doing compile testing. Reported-by: Fengguang Wu Signed-off-by: Mark Brown --- sound/soc/tegra/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig index b0c8ecf8101b..66b7a068202e 100644 --- a/sound/soc/tegra/Kconfig +++ b/sound/soc/tegra/Kconfig @@ -2,7 +2,7 @@ config SND_SOC_TEGRA tristate "SoC Audio for the Tegra System-on-Chip" depends on ARCH_TEGRA && TEGRA20_APB_DMA select REGMAP_MMIO - select SND_SOC_GENERIC_DMAENGINE_PCM if TEGRA20_APB_DMA + select SND_SOC_GENERIC_DMAENGINE_PCM help Say Y or M here if you want support for SoC audio on Tegra. -- cgit v1.2.3 From 22abf843af0686a58b2b6b33d02388d4bbbbcd25 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 15 Jul 2013 17:09:40 +0100 Subject: ASoC: tegra: Enable COMPILE_TEST builds Since there is no architecture dependency in the code allow it to be built on any platform when COMPILE_TEST is enabled. Signed-off-by: Mark Brown Acked-by: Stephen Warren --- sound/soc/tegra/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig index 66b7a068202e..8fc653ca3ab4 100644 --- a/sound/soc/tegra/Kconfig +++ b/sound/soc/tegra/Kconfig @@ -1,6 +1,6 @@ config SND_SOC_TEGRA tristate "SoC Audio for the Tegra System-on-Chip" - depends on ARCH_TEGRA && TEGRA20_APB_DMA + depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST select REGMAP_MMIO select SND_SOC_GENERIC_DMAENGINE_PCM help -- cgit v1.2.3 From d0c05ad7827df545760e7659471965ce4ccf655d Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 16 Jul 2013 11:00:44 -0600 Subject: ASoC: tegra: fix compile warning in AC'97 driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following by deleting dead code: sound/soc/tegra/tegra20_ac97.c: In function ‘tegra20_ac97_platform_probe’: sound/soc/tegra/tegra20_ac97.c:435:1: warning: label ‘err_unregister_pcm’ defined but not used [-Wunused-label] Signed-off-by: Stephen Warren Signed-off-by: Mark Brown --- sound/soc/tegra/tegra20_ac97.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index e58233f7df61..87b845f4cd1b 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -432,8 +432,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) return 0; -err_unregister_pcm: - tegra_pcm_platform_unregister(&pdev->dev); err_unregister_component: snd_soc_unregister_component(&pdev->dev); err_asoc_utils_fini: -- cgit v1.2.3 From 7ac0da8cd38cb09d0addf708a8abbb93cf325c68 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 14 Aug 2013 14:26:29 -0600 Subject: ASoC: tegra: support a Mic Jack in the Tegra+RT5640 machine driver Add a Mic Jack widget to the Tegra+RT5640 machine driver, and document this in the DT binding. This enables the DT to include the Mic Jack in the audio routing table, and hence enables capture of audio, in addition to the previously-working playback. Signed-off-by: Stephen Warren Signed-off-by: Mark Brown --- Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt | 1 + sound/soc/tegra/tegra_rt5640.c | 1 + 2 files changed, 2 insertions(+) (limited to 'sound') diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt index cba4f88bd9f0..dc6224994d69 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5640.txt @@ -16,6 +16,7 @@ Required properties: * Headphones * Speakers + * Mic Jack - nvidia,i2s-controller : The phandle of the Tegra I2S controller that's connected to the CODEC. diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c index 08794f915a94..4511c5a875ec 100644 --- a/sound/soc/tegra/tegra_rt5640.c +++ b/sound/soc/tegra/tegra_rt5640.c @@ -99,6 +99,7 @@ static struct snd_soc_jack_gpio tegra_rt5640_hp_jack_gpio = { static const struct snd_soc_dapm_widget tegra_rt5640_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphones", NULL), SND_SOC_DAPM_SPK("Speakers", NULL), + SND_SOC_DAPM_MIC("Mic Jack", NULL), }; static const struct snd_kcontrol_new tegra_rt5640_controls[] = { -- cgit v1.2.3 From b4345006423d45622bc17198a598baefcea27c93 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Wed, 14 Aug 2013 11:11:19 +0200 Subject: ASoC: tegra20-ac97: simplify use of devm_ioremap_resource Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // Signed-off-by: Julia Lawall Signed-off-by: Mark Brown --- sound/soc/tegra/tegra20_ac97.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sound') diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index 87b845f4cd1b..964cedf454d1 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -334,12 +334,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) } mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!mem) { - dev_err(&pdev->dev, "No memory resource\n"); - ret = -ENODEV; - goto err_clk_put; - } - regs = devm_ioremap_resource(&pdev->dev, mem); if (IS_ERR(regs)) { ret = PTR_ERR(regs); -- cgit v1.2.3