From a4519ecbd01d1033588a6e62447193afba3509ed Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 29 Apr 2014 19:18:33 +0800 Subject: ASoC: atmel: Atmel WM8904 codec support needs I2C The WM8904 codec driver needs I2C to be enabled, so the SND_ATMEL_SOC_WM8904 option also requires this. Found using randconfig build testing. Signed-off-by: Arnd Bergmann Signed-off-by: Xia Kaixu Signed-off-by: Mark Brown --- sound/soc/atmel/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/soc/atmel') diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig index 4789619a52d8..27e3fc4a536b 100644 --- a/sound/soc/atmel/Kconfig +++ b/sound/soc/atmel/Kconfig @@ -35,7 +35,7 @@ config SND_AT91_SOC_SAM9G20_WM8731 config SND_ATMEL_SOC_WM8904 tristate "Atmel ASoC driver for boards using WM8904 codec" - depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC + depends on ARCH_AT91 && ATMEL_SSC && SND_ATMEL_SOC && I2C select SND_ATMEL_SOC_SSC select SND_ATMEL_SOC_DMA select SND_SOC_WM8904 -- cgit v1.2.3 From b74f7be90f5bd231358289dca1b25c91fe21143d Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 6 May 2014 09:39:40 +0200 Subject: ASoC: atmel-pcm-pdc: Remove broken suspend/resume code Suspend/resume support for the atmel-pcm-pdc driver was broken in commit f0fba2ad1 ("ASoC: multi-component - ASoC Multi-Component Support"). It essentially reverted the modifications done in commit 10cab262 ("ASoC: Change how suspend and resume obtain the PCM runtime"). The suspend and resume handlers at the beginning check if dai->runtime is not NULL, but dai->runtime is always NULL, hence the code never runs. Considering that nobody noticed any problems in the last 4 years since the code was broken and that the driver does not set SNDRV_PCM_INFO_RESUME, which means applications are expected to stop and restart the audio stream during suspend/resume, it is probably safe to assume that his code is not needed and can be removed. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- sound/soc/atmel/atmel-pcm-pdc.c | 63 ----------------------------------------- 1 file changed, 63 deletions(-) (limited to 'sound/soc/atmel') diff --git a/sound/soc/atmel/atmel-pcm-pdc.c b/sound/soc/atmel/atmel-pcm-pdc.c index 33ec592ecd75..a366b3503c28 100644 --- a/sound/soc/atmel/atmel-pcm-pdc.c +++ b/sound/soc/atmel/atmel-pcm-pdc.c @@ -76,12 +76,6 @@ struct atmel_runtime_data { size_t period_size; dma_addr_t period_ptr; /* physical address of next period */ - - /* PDC register save */ - u32 pdc_xpr_save; - u32 pdc_xcr_save; - u32 pdc_xnpr_save; - u32 pdc_xncr_save; }; /*--------------------------------------------------------------------------*\ @@ -320,67 +314,10 @@ static struct snd_pcm_ops atmel_pcm_ops = { .mmap = atmel_pcm_mmap, }; - -/*--------------------------------------------------------------------------*\ - * ASoC platform driver -\*--------------------------------------------------------------------------*/ -#ifdef CONFIG_PM -static int atmel_pcm_suspend(struct snd_soc_dai *dai) -{ - struct snd_pcm_runtime *runtime = dai->runtime; - struct atmel_runtime_data *prtd; - struct atmel_pcm_dma_params *params; - - if (!runtime) - return 0; - - prtd = runtime->private_data; - params = prtd->params; - - /* disable the PDC and save the PDC registers */ - - ssc_writel(params->ssc->regs, PDC_PTCR, params->mask->pdc_disable); - - prtd->pdc_xpr_save = ssc_readx(params->ssc->regs, params->pdc->xpr); - prtd->pdc_xcr_save = ssc_readx(params->ssc->regs, params->pdc->xcr); - prtd->pdc_xnpr_save = ssc_readx(params->ssc->regs, params->pdc->xnpr); - prtd->pdc_xncr_save = ssc_readx(params->ssc->regs, params->pdc->xncr); - - return 0; -} - -static int atmel_pcm_resume(struct snd_soc_dai *dai) -{ - struct snd_pcm_runtime *runtime = dai->runtime; - struct atmel_runtime_data *prtd; - struct atmel_pcm_dma_params *params; - - if (!runtime) - return 0; - - prtd = runtime->private_data; - params = prtd->params; - - /* restore the PDC registers and enable the PDC */ - ssc_writex(params->ssc->regs, params->pdc->xpr, prtd->pdc_xpr_save); - ssc_writex(params->ssc->regs, params->pdc->xcr, prtd->pdc_xcr_save); - ssc_writex(params->ssc->regs, params->pdc->xnpr, prtd->pdc_xnpr_save); - ssc_writex(params->ssc->regs, params->pdc->xncr, prtd->pdc_xncr_save); - - ssc_writel(params->ssc->regs, PDC_PTCR, params->mask->pdc_enable); - return 0; -} -#else -#define atmel_pcm_suspend NULL -#define atmel_pcm_resume NULL -#endif - static struct snd_soc_platform_driver atmel_soc_platform = { .ops = &atmel_pcm_ops, .pcm_new = atmel_pcm_new, .pcm_free = atmel_pcm_free, - .suspend = atmel_pcm_suspend, - .resume = atmel_pcm_resume, }; int atmel_pcm_pdc_platform_register(struct device *dev) -- cgit v1.2.3 From d77a14b579f6bfe2d149d3bcc5bd306e20d2d652 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 19 May 2014 16:17:27 +0300 Subject: ASoC: Remove needless snd_soc_dapm_enable_pin() from machine driver inits ALSA SoC core marks widgets as connected by default when they are initialized in snd_soc_dapm_new_control() so there is no need to call snd_soc_dapm_enable_pin() from machine driver init functions. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- sound/soc/atmel/snd-soc-afeb9260.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'sound/soc/atmel') diff --git a/sound/soc/atmel/snd-soc-afeb9260.c b/sound/soc/atmel/snd-soc-afeb9260.c index f65f08beac31..9579799ace54 100644 --- a/sound/soc/atmel/snd-soc-afeb9260.c +++ b/sound/soc/atmel/snd-soc-afeb9260.c @@ -80,17 +80,6 @@ static const struct snd_soc_dapm_route afeb9260_audio_map[] = { {"MICIN", NULL, "Mic Jack"}, }; -static int afeb9260_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) -{ - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_dapm_context *dapm = &codec->dapm; - - snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); - snd_soc_dapm_enable_pin(dapm, "Line In"); - snd_soc_dapm_enable_pin(dapm, "Mic Jack"); - - return 0; -} /* Digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link afeb9260_dai = { @@ -100,7 +89,6 @@ static struct snd_soc_dai_link afeb9260_dai = { .codec_dai_name = "tlv320aic23-hifi", .platform_name = "atmel_pcm-audio", .codec_name = "tlv320aic23-codec.0-001a", - .init = afeb9260_tlv320aic23_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_CBM_CFM, .ops = &afeb9260_ops, -- cgit v1.2.3