Stefan.George
Stefan.George

Reputation: 51

PCM raw data into user space

I have the following setup: an imx28 running 2.6.34 kernel. The SAIF interface is connected to the PCM output of an Cinterion modem. I want to export the PCM raw data to userspace in something like a character driver. Do you have any ideas regarding the implementation?

Upvotes: 1

Views: 1125

Answers (1)

Craig McQueen
Craig McQueen

Reputation: 43426

The "correct approach" is probably to make an ALSA driver, and access the PCM data through the ALSA driver. Then the device appears as a sound device, and the PCM data can be accessed by any ALSA audio program, such as arecord.

Advantages:

  • You're using the standard API for sound data, so your device can be accessed by the many existing audio tools. And conversely, the userspace program you write will work with other audio devices.
  • The driver should provide the relevant details about the PCM sample rates and data format, so it works easily for audio programs.

The i.MX28 ALSA drivers use the ASoC architecture. See the Documentation/sound/alsa/soc directory in the Linux source.

P.S.: I see you've asked a follow-on question which indicates you're heading in the ALSA ASoC direction.

Upvotes: 1

Related Questions