[alsa-devel] Access to bytes from the raw audio stream? (AC'97)
Hi there,
I'm new to ALSA, and working on a project where I need to find out where I can see/modify the raw bytes coming in from/going out to a device. The device is an AC'97 codec (a philips UCB1400, if it makes any difference...) on an embedded board.
I tried looking on the web, and found the tutorial at http://www.alsa-project.org/~tiwai/writing-an-alsa-driver/, but that seems to be more about device management and configuration.
So, can anybody tell me what functions and files in the sound/ directory of the linux kernel I need to look at to see/modify the raw data stream coming in? Am I just missing something in the tutorial? I'd appreciate any suggestions very much.
Thanks,
John Graham
On Wed, Feb 03, 2010 at 04:08:38PM +0000, John Graham wrote:
So, can anybody tell me what functions and files in the sound/ directory of the linux kernel I need to look at to see/modify the raw data stream coming in? Am I just missing something in the tutorial? I'd appreciate any suggestions very much.
With a lot of AC97 controllers the hardware won't allow you direct access to the cooked wire data, you'll only be able to see decoded audio streams. What is it that you're actually trying to do?
For embedded platforms you mostly want to look under sound/soc though there are a few platforms outside of there.
With a lot of AC97 controllers the hardware won't allow you direct access to the cooked wire data, you'll only be able to see decoded audio streams. What is it that you're actually trying to do?
Basically, we've got a problem where we think our processor is bit-shifting the sample for some reason, and I was going to see if I could either (i) un-bit-shift it (it looks like we're not actually losing any data, the sound's just being multiplied by 2^4), or (ii) reproduce the problem we see by bit-shifting the samples on a known-good platform.
For embedded platforms you mostly want to look under sound/soc though there are a few platforms outside of there.
I know the drivers for our particular setup (UBC1400 codec/i.MX25 processor) are under sound/arm, but I'm not sure if there's anything in there that actually sees the samples as they come through.
Would I be able to access samples quite early on in the generic AC'97 code (I don't know where that is, either, but it would be interesting to see, at least :p)
Thanks,
John G
On Wed, Feb 03, 2010 at 04:27:05PM +0000, John Graham wrote:
Basically, we've got a problem where we think our processor is bit-shifting the sample for some reason, and I was going to see if I could either (i) un-bit-shift it (it looks like we're not actually losing any data, the sound's just being multiplied by 2^4), or (ii) reproduce the problem we see by bit-shifting the samples on a known-good platform.
Presumably you can just bit shift the audio data in userspace?
Would I be able to access samples quite early on in the generic AC'97 code (I don't know where that is, either, but it would be interesting to see, at least :p)
As I said most AC97 controllers handle all the multiplexing and framing in hardware so the generic AC97 layer doesn't deal with AC97 wire format at all. You will need to look at your AC97 controller driver.
participants (2)
-
John Graham
-
Mark Brown