Re: A driver question - hiding channels in a DMA buffer
Re: A driver question - hiding channels in a DMA buffer
- Subject: Re: A driver question - hiding channels in a DMA buffer
- From: Mark Cookson <email@hidden>
- Date: Mon, 9 Sep 2002 10:51:20 -0700
I can't think of any other way of doing this than to just report your
device as 6 channels (because that's what it is), and then do the math
to get your data to the right place.
It shouldn't be too bad as the buffer given to you by CoreAudio will be
sequential audio, though your clip routine will need to convert from
float to 32 bit and calculate where to put that sample in your PCI
card's memory. It's too bad that the hardware is using channels
1,2,3,4,5,6 because that gap from channel 2 to channel 7 is going to
give the PCI bus a real workout.
There are two ways to do the copy, and you should experiment to find
out which one works best. One way is to copy linearly from the
CoreAudio buffer to your hardware, jumping around in PCI memory as
required by your card. The other option is to jump around in
CoreAudio's buffer to go linearly through your PCI card's memory.
Normally this is a better way to go because the PCI bus is so much
slower than the main memory bus, you want the performance improvement
of having all the writes gathered together. However, with your writes
being slightly scattered, there might not be much of a performance
boost. Still, it's worth experimenting with.
Good luck,
Mark
On Monday, September 9, 2002, at 09:56 AM, Devendra Parakh wrote:
Hi,
We have a driver for a PCI audio device with 12 input channels (32bit
samples). This driver is working fine.
We have to now modify this driver for another flavor of the device
which
only only provides connectors for 6 of the 12 channels. In other words,
we want to expose only 6 channels (channel number 1,2,7,8,9,10,11 and
12)
to CoreAudio HAL.
However, the DMA buffers will always contain data for all 12 channels.
Is there a good solution?
If I report 6 channels, then ConvertInputSamples() will probably come
back with inappropriate buffer pointers!
Any help would be greatly appreciated!
Thanks.
Devendra.
Devendra ParakhSinging Electrons,
Inc.http://www.singingelectrons.com425-889-2478
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Mark Cookson
Engineering Droid
Apple Computer, Inc.
Core Audio CPU Software
6 Infinite Loop MS 306-2CW
Cupertino, CA 95014
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.