PCM3060 DAI driver ".format" value seems to be incorrect
Hi,
I am using a PCM3060 codec connected to a STM32MP135 MPU over I2S1 and I2C, and compiling STM Linux (v6.1) (along with STM's version of TF-A, Optee, and U-Boot) using Buildroot.
I had some trouble getting ALSA to output to the codec, it kept giving the response:
44004000.audio-controller-pcm3060-dac: ASoC: pcm3060-dac <-> 44004000.audio-controller No matching formats
I managed to work around the issue by changing the formats entry in snd_soc_dai_driver, in pcm3060.c (https://github.com/STMicroelectronics/linux/blob/7928f69738d2e57ee2a0dba6e9e680a3bf75ded9/sound/soc/codecs/pcm3060.c#L189) to SNDRV_PCM_FMTBIT_S32_LE.
#define PCM3060_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
static struct snd_soc_dai_driver pcm3060_dai[] = {
{
.name = "pcm3060-dac",
.id = PCM3060_DAI_ID_DAC,
.playback = {
.stream_name = "Playback",
.channels_min = 2,
.channels_max = 2,
.rates = PCM3060_DAI_RATES_DAC,
.formats = PCM3060_FORMATS,
},
.ops = &pcm3060_dai_ops,
},
{
.name = "pcm3060-adc",
.id = PCM3060_DAI_ID_ADC,
.capture = {
.stream_name = "Capture",
.channels_min = 2,
.channels_max = 2,
.rates = PCM3060_DAI_RATES_ADC,
.formats = PCM3060_FORMATS,
},
.ops = &pcm3060_dai_ops,
},
};
Everything seems to be working great now. I'm party posting here in case anybody else searches for the same problem, but also because I don't really understand the underlying cause of the problem. Is this a bug in STM's implementation of Linux, or the mainline driver? Or just a quirk of my set up? It's a fairly old chip but the code seems to still be maintained so I'm just wondering if I should report a bug or if I've just mucked something up in my configuration?
Thanks for any advice,
Tom
