All of lore.kernel.org
 help / color / mirror / Atom feed
* struct snd_pcm_ops callbacks
@ 2023-01-25 11:33 ` Muni Sekhar
  0 siblings, 0 replies; 8+ messages in thread
From: Muni Sekhar @ 2023-01-25 11:21 UTC (permalink / raw)
  To: alsa-devel, linux-sound

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?


-- 
Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 8+ messages in thread

* struct snd_pcm_ops callbacks
@ 2023-01-25 11:33 ` Muni Sekhar
  0 siblings, 0 replies; 8+ messages in thread
From: Muni Sekhar @ 2023-01-25 11:33 UTC (permalink / raw)
  To: alsa-devel, linux-sound

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?


-- 
Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: struct snd_pcm_ops callbacks
  2023-01-25 11:33 ` Muni Sekhar
@ 2023-01-25 15:00   ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2023-01-25 15:00 UTC (permalink / raw)
  To: Muni Sekhar, alsa-devel, linux-sound



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.

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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: struct snd_pcm_ops callbacks
@ 2023-01-25 15:00   ` Pierre-Louis Bossart
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2023-01-25 15:00 UTC (permalink / raw)
  To: Muni Sekhar, alsa-devel, linux-sound



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.

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: struct snd_pcm_ops callbacks
  2023-01-25 15:00   ` Pierre-Louis Bossart
@ 2023-01-25 18:18     ` Muni Sekhar
  -1 siblings, 0 replies; 8+ messages in thread
From: Muni Sekhar @ 2023-01-25 18:06 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: alsa-devel, linux-sound

On Wed, Jan 25, 2023 at 8:30 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> 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.

>
> 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.
>
>


-- 
Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: struct snd_pcm_ops callbacks
@ 2023-01-25 18:18     ` Muni Sekhar
  0 siblings, 0 replies; 8+ messages in thread
From: Muni Sekhar @ 2023-01-25 18:18 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: alsa-devel, linux-sound

On Wed, Jan 25, 2023 at 8:30 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> 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.

>
> 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.
>
>


-- 
Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: struct snd_pcm_ops callbacks
  2023-01-25 18:18     ` Muni Sekhar
@ 2023-01-25 18:34       ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2023-01-25 18:34 UTC (permalink / raw)
  To: Muni Sekhar; +Cc: alsa-devel, linux-sound



On 1/25/23 12:06, Muni Sekhar wrote:
> On Wed, Jan 25, 2023 at 8:30 PM Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> 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.
>>
>>
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: struct snd_pcm_ops callbacks
@ 2023-01-25 18:34       ` Pierre-Louis Bossart
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2023-01-25 18:34 UTC (permalink / raw)
  To: Muni Sekhar; +Cc: alsa-devel, linux-sound



On 1/25/23 12:06, Muni Sekhar wrote:
> On Wed, Jan 25, 2023 at 8:30 PM Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> 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.
>>
>>
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-01-25 18:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 11:21 struct snd_pcm_ops callbacks Muni Sekhar
2023-01-25 11:33 ` Muni Sekhar
2023-01-25 15:00 ` Pierre-Louis Bossart
2023-01-25 15:00   ` Pierre-Louis Bossart
2023-01-25 18:06   ` Muni Sekhar
2023-01-25 18:18     ` Muni Sekhar
2023-01-25 18:34     ` Pierre-Louis Bossart
2023-01-25 18:34       ` Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.