From: Mark Brown Date: Sat, 25 Feb 2023 21:48:13 +0000 (+0000) Subject: ASoC: sam9g20ek: Disable capture unless building with microphone input X-Git-Tag: v6.3-rc1~12^2~4^2~8 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c769fb6bcc485d752d492064a9005525a8d5fa24;p=tomoyo%2Ftomoyo-test1.git ASoC: sam9g20ek: Disable capture unless building with microphone input Without modification the AT91SAM9G20-EK has no capture support, none of the inputs of the CODEC are wired to anything to useful and there are no paths supporting loopback. Since the audio is clocked from the CODEC and the DAPM inputs are marked as unusable this means that capture will fail to transfer any data as the ADC path can't be powered up. Flag this in the device description so apps don't see unusable capture support, guarded with the existing optional define for mic input. Reviewed-by: Claudiu Beznea Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230225-asoc-sam9g20ek-v1-1-9baeb4893142@kernel.org Signed-off-by: Mark Brown --- diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index 1430642c8433..785b9d01d8af 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -98,6 +98,9 @@ static struct snd_soc_dai_link at91sam9g20ek_dai = { .init = at91sam9g20ek_wm8731_init, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBP_CFP, +#ifndef ENABLE_MIC_INPUT + .playback_only = true, +#endif SND_SOC_DAILINK_REG(pcm), };