Question about simple-audio-card with dummy CODEC
I want to use a PDM microphone on a variety of i.MX8M (Mini/Nano/Plus) boards with the simple-audio-card driver. I can get this device to enumerate when I use "fsl,imx-audio-card" and it appears that it connects to a dummy codec:
sysdefault:CARD=imxaudiomicfil imx-audio-micfil, micfil hifi snd-soc-dummy-dai-0 Default Audio Device
When I attempt to use "simple-audio-card" with just the simple-audio-card,cpu sound-dai node pointing to the micfil cpu without a codec node, nothing appears in arecord -L, and I don't see errors.
I am guessing the simple-audio-card driver is expecting a CODEC, so hacked soc-utils.c to give soc_dummy_driver an of_match_table and assigned it a corresponding 'compatible' name. I then routed the codec node on the simple-audio-card to the dummy CODEC and it enumerated just like it did with the custom fsl,imx-audio-card driver:
sysdefault:CARD=soundpdm sound-pdm, 30ca0000.audio-controller-snd-soc-dummy-dai snd-soc-dummy-dai-0 Default Audio Device
I am asking what is the best way to let simple-audio-card use a dummy codec? If the dummy codec is the better option, what compatible name should I use?
adam
On Sat, Aug 26, 2023 at 11:15:30PM -0500, Adam Ford wrote:
I am asking what is the best way to let simple-audio-card use a dummy codec? If the dummy codec is the better option, what compatible name should I use?
We have a driver for DMICs, dmic.c - you should use that. In general you should never use the dummy CODEC, you should use a driver for the specific thing on the board which will at least describe the capabilities of the hardware even if it doesn't have any ops that do anything.
On Sun, Aug 27, 2023 at 6:54 AM Mark Brown broonie@kernel.org wrote:
On Sat, Aug 26, 2023 at 11:15:30PM -0500, Adam Ford wrote:
I am asking what is the best way to let simple-audio-card use a dummy codec? If the dummy codec is the better option, what compatible name should I use?
We have a driver for DMICs, dmic.c - you should use that. In general
Thank you. This looks like exactly what I need. I just didn't know what it was called.
you should never use the dummy CODEC, you should use a driver for the specific thing on the board which will at least describe the capabilities of the hardware even if it doesn't have any ops that do anything.
I thought the dummy codec was a bad idea based on my searching. I appreciate the quick response.
adam
participants (2)
-
Adam Ford
-
Mark Brown