alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Access to bytes from the raw audio stream? (AC'97)
@ 2010-02-03 16:08 John Graham
  2010-02-03 16:17 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: John Graham @ 2010-02-03 16:08 UTC (permalink / raw)
  To: alsa-devel

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

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

* Re: Access to bytes from the raw audio stream? (AC'97)
  2010-02-03 16:08 Access to bytes from the raw audio stream? (AC'97) John Graham
@ 2010-02-03 16:17 ` Mark Brown
  2010-02-03 16:27   ` John Graham
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2010-02-03 16:17 UTC (permalink / raw)
  To: John Graham; +Cc: alsa-devel

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.

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

* Re: Access to bytes from the raw audio stream? (AC'97)
  2010-02-03 16:17 ` Mark Brown
@ 2010-02-03 16:27   ` John Graham
  2010-02-03 16:59     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: John Graham @ 2010-02-03 16:27 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

> 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

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

* Re: Access to bytes from the raw audio stream? (AC'97)
  2010-02-03 16:27   ` John Graham
@ 2010-02-03 16:59     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2010-02-03 16:59 UTC (permalink / raw)
  To: John Graham; +Cc: alsa-devel

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.

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

end of thread, other threads:[~2010-02-03 16:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 16:08 Access to bytes from the raw audio stream? (AC'97) John Graham
2010-02-03 16:17 ` Mark Brown
2010-02-03 16:27   ` John Graham
2010-02-03 16:59     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).