Question about simple-audio-card with dummy CODEC
From: Adam Ford
Date: Sun Aug 27 2023 - 00:26:12 EST
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