Audio output for CS4231, patch/RFC
Hi,
This patch hooks CS4231 to the audio subsystem. It's not ready for applying, though I can already make some noise. Any comments?
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Quoted 3 lines · Blue Swirl
Hi,
This patch hooks CS4231 to the audio subsystem. It's not ready for applying, though I can already make some noise. Any comments?
One comment: you could move the DMA related functions and registers to sparc32_dma.c because it seems reasonnable that the DMA stuff was really implemented outside of the cs4231 chip (I believe the same chip was used in some PC cards with an ISA based DMA).
Regards,
Fabrice.
Quoted 1 line
One comment: you could move the DMA related functions and registers to
sparc32_dma.cbecause it seems reasonnable that the DMA stuff was really implemented outside of the cs4231 chip (I believe the same chip was used in some PC cards with an ISA based DMA).
I had thought about that, but the CS and DMA registers are located in nearby addresses. Cleanest solution from the driver point of view would be that Qemu handled the case correctly where several drivers register non-overlapping memory areas of less than one page size within the same page. That way the DMA controller could reside in sparc32_dma.c and not know anything about CS registers and vice versa.
Looks like the PC cards were called Windows Sound System compatible and there were several manufacturers in the early '90s.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Quoted 5 lines · Blue Swirl <blueswir1 <at> hotmail.com> writes:
Hi,
This patch hooks CS4231 to the audio subsystem. It's not ready for applying, though I can already make some noise. Any comments?
After having a cursory look at it only one thing really caught my attention:
in the audio callback you set s->audio_free to the provided value, but then in you never use it. If i'm reading everything correctly this would lead to reading N bytes from DMA in write_audio, succeeding in writing only M bytes (where M < N) to the audio subsystem and loosing N-M bytes forever. Basically you should never attempt to do volatile reads of more than audio_free bytes. SB16 operates in similar fashion.
Quoted 7 lines
After having a cursory look at it only one thing really caught my attention:
in the audio callback you sets->audio_freeto the provided value, but then in you never use it. If i'm reading everything correctly this would lead to reading N bytes from DMA inwrite_audio, succeeding in writing only M bytes (where M < N) to the audio subsystem and loosing N-M bytes forever. Basically you should never attempt to do volatile reads of more thanaudio_freebytes. SB16 operates in similar fashion.
Okay, thanks for the clarification.
By the way, I couldn't find where AUD_open_out is implemented, what did I miss?
_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/
Quoted 11 lines · Blue Swirl
Quoted 7 lines
After having a cursory look at it only one thing really caught my attention:
in the audio callback you sets->audio_freeto the provided value, but then in you never use it. If i'm reading everything correctly this would lead to reading N bytes from DMA inwrite_audio, succeeding in writing only M bytes (where M < N) to the audio subsystem and loosing N-M bytes forever. Basically you should never attempt to do volatile reads of more thanaudio_freebytes. SB16 operates in similar fashion.Okay, thanks for the clarification.
By the way, I couldn't find where
AUD_open_outis implemented, what did I miss?
audio/audio_template.h (since code is mostly the same for in and out)
--
mailto:[email protected]