On 1/25/23 12:06, Muni Sekhar wrote: > On Wed, Jan 25, 2023 at 8:30 PM Pierre-Louis Bossart > <pierre-louis.bossart@xxxxxxxxxxxxxxx> wrote: >> >> >> >> On 1/25/23 05:21, Muni Sekhar wrote: >>> Hi, >>> >>> struct snd_pcm_ops callbacks can be used for sending\receiving PDM >>> audio data to and from a sound card? Or is it only designed for PCM >>> audio data? >> >> It depends what side of the sound card you are looking at, the physical >> interface with external devices or the userspace interface. > I am looking at the userspace interface side. that's not possible without some sort of formatting of 1-bit audio in bytes or more likely 24/32-bit words that look like PCM and can be handled by existing DMA/FIFO hardware. That solution works for HDMI/DP and USB. >> PDM can be supported at the physical interface level as long as there is >> a conversion to PCM somewhere in the hardware. Userspace will >> play/record PCM. See examples in many codecs and SOCs. >> >> There is also the possibility of packing PDM (aka DSD) as pseudo-PCM, >> that's a trick used by several USB cards. In that case of course the >> sound card cannot apply any processing to the data and is just a >> pass-through module. >> >> > >