* [Qemu-devel] Audio stream handling in QEMU device model
@ 2014-09-03 19:37 Harry Cruise
0 siblings, 0 replies; 5+ messages in thread
From: Harry Cruise @ 2014-09-03 19:37 UTC (permalink / raw)
To: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
Hello,
I am trying to understand QEMU AUDIO backend functionality and need to implementing device which has few audio channels from which it receives audio streams (sampled at some specific frequency), and further process that data stream like mixing two stream.
I am new for the QEMU, Please help me in following queries:
1) Please suggest some document and example/device implement which has use qemu audio backend.
2) To implement audio stream read/write functionality, can anyone please suggest pseudocode for the implementation in which audio stream data (samples at some specific frequency ) is stored into some device buffers.
3) What steps I need to add into device to setup audio support as per the requirement I mentioned above ?
Regards,
Harry
[-- Attachment #2: Type: text/html, Size: 3478 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Audio stream handling in QEMU device model
@ 2014-09-04 7:22 Harry Cruise
2014-09-04 8:00 ` Gerd Hoffmann
0 siblings, 1 reply; 5+ messages in thread
From: Harry Cruise @ 2014-09-04 7:22 UTC (permalink / raw)
To: Qemu-devel, av1474@comtv.ru, kraxel@redhat.com
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
Hello,
I am trying to comprehend QEMU AUDIO backend functionality and need to
implementing device which has few audio channels from which it receives
audio streams (sampled at some specific frequency), and further process
that data stream like mixing two stream.
I am new for the QEMU, Please help me in following queries:
1) Please suggest some document and example/device implement which has use qemu audio backend.
2) To implement audio
stream read/write functionality, can anyone please suggest pseudocode
for the implementation in which audio stream data (samples at some
specific frequency ) is stored into some device buffers.
3) What steps I need to add into device to setup audio support as per the requirement I mentioned above ?
4) what is the basic working flow of audio backend and accessing audio streams using dma ?
[-- Attachment #2: Type: text/html, Size: 3010 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Audio stream handling in QEMU device model
2014-09-04 7:22 [Qemu-devel] Audio stream handling in QEMU device model Harry Cruise
@ 2014-09-04 8:00 ` Gerd Hoffmann
2014-09-05 11:55 ` Harry Cruise
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2014-09-04 8:00 UTC (permalink / raw)
To: Harry Cruise; +Cc: av1474@comtv.ru, Qemu-devel
On Do, 2014-09-04 at 00:22 -0700, Harry Cruise wrote:
> Hello,
>
>
> I am trying to comprehend QEMU AUDIO backend functionality and need to
> implementing device which has few audio channels from which it
> receives audio streams (sampled at some specific frequency), and
> further process that data stream like mixing two stream.
>
>
> I am new for the QEMU, Please help me in following queries:
>
>
> 1) Please suggest some document and example/device implement which has
> use qemu audio backend.
hw/usb/dev-audio.c (implementing usb speaker emulation) is probably the
best sample code for that.
> 3) What steps I need to add into device to setup audio support as per
> the requirement I mentioned above ?
You can just create multiple streams. AUD_open_* returns a handle so
you can disturgist them.
> 4) what is the basic working flow of audio backend and accessing audio
> streams using dma ?
Nothing special for audio here, they do dma like any other device. You
don't see that in hw/usb/dev-audio.c though as DMA is handled elsewhere
(uhci/ehci/xhci usb host adapter emulation). You might want to look at
intel-hda for pci dma sample code.
HTH,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Audio stream handling in QEMU device model
2014-09-04 8:00 ` Gerd Hoffmann
@ 2014-09-05 11:55 ` Harry Cruise
2014-09-06 19:06 ` Harry Cruise
0 siblings, 1 reply; 5+ messages in thread
From: Harry Cruise @ 2014-09-05 11:55 UTC (permalink / raw)
To: Gerd Hoffmann, av1474@comtv.ru; +Cc: QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 2714 bytes --]
Hi,
Thanks for the reply.. Kindly help me with few more queries..
I tried to understand the audio implementation in qemu from the sources you have suggested. Now, I am confused how audio emulation actually works.
The subject
On Thursday, September 4, 2014 1:32 PM, Gerd Hoffmann <kraxel@redhat.com> wrote:
On Do, 2014-09-04 at 00:22 -0700, Harry Cruise wrote:
> Hello,
>
>
> I am trying to comprehend QEMU AUDIO backend functionality and need to
> implementing device which has few audio channels from which it
> receives audio streams (sampled at some specific frequency), and
> further process that data stream like mixing two stream.
>
>
> I am new for the QEMU, Please help me in following queries:
>
>
> 1) Please suggest some document and example/device implement which has
> use qemu audio backend.
hw/usb/dev-audio.c (implementing usb speaker emulation) is probably the
best sample code for that.
> 3) What steps I need to add into device to setup audio support as per
> the requirement I mentioned above ?
You can just create multiple streams. AUD_open_* returns a handle so
you can disturgist them.
> 4) what is the basic working flow of audio backend and accessing audio
> streams using dma ?
Nothing special for audio here, they do dma like any other device. You
don't see that in hw/usb/dev-audio.c though as DMA is handled elsewhere
(uhci/ehci/xhci usb host adapter emulation). You might want to look at
intel-hda for pci dma sample code.
HTH,
Gerd
is that I need to read the audio streams sampled at particular frequency into some device buffers, then do some process on data buffers and generate some output audio stream.
There are some API's and structs which I believe can be useful for above subject. But I could not understand what exactly it does, or simply how it works ?
1) AUD_read --> As fas as I understand this reads data from some HWVoiceIn structure member associated with SWVoiceIn structure.
Please help me in understanding what it does ?
Does it read data from some hardware (i.e. mic) , how I can test this in QEMU ?
2) AUD_write -> Does it sends data to the hardware (i.e., speaker) ?, again how I can test this in QEMU ?
For , above what I understand is that any hardware might have associated buffer, and AUD_read/write api's read/write data from/to that buffers, and drivers associated with the hardware might managing it.
Is it possible that I can associate multiple SWVoiceOut to a single HWVoiceOut ?
What is the use of this structures:
SWVoiceIn/Out
HWVoiceIn/Out
3) Reading a audio streams.. how it differs if we read some file data (like reading from *.wav/*.mp4 etc) ? Do we still need to use AUD_read ?
Thanks in advance !!
[-- Attachment #2: Type: text/html, Size: 5305 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Audio stream handling in QEMU device model
2014-09-05 11:55 ` Harry Cruise
@ 2014-09-06 19:06 ` Harry Cruise
0 siblings, 0 replies; 5+ messages in thread
From: Harry Cruise @ 2014-09-06 19:06 UTC (permalink / raw)
To: Harry Cruise, Gerd Hoffmann, av1474@comtv.ru; +Cc: QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 4440 bytes --]
Hi,
Thanks for the reply.. Kindly help me with few more queries..
I tried to understand the audio implementation in qemu from the sources
you have suggested. Now, I am confused how audio emulation actually
works.
The subject is that I need to read the audio streams sampled at particular frequency into some device buffers, then do some process on data buffers and
generate some output audio stream.
There
are some API's and structs which I believe can be useful for above
subject. But I could not understand what exactly it does, or simply how
it works ?
1) AUD_read --> As fas as
I understand this reads data from some HWVoiceIn structure member
associated with SWVoiceIn structure.
Please help me in understanding what it does ?
Does it read data from some hardware (i.e. mic) , how I can test this in QEMU ?
2) AUD_write -> Does it sends data to the hardware (i.e., speaker) ?, again how I can test this in QEMU ?
For
, above what I understand is that any hardware might have
associated buffer, and AUD_read/write api's read/write data from/to
that buffers, and drivers associated with the hardware might managing
it.
Is it possible that I can associate multiple SWVoiceOut to a single HWVoiceOut ?
What is the use of this structures:
SWVoiceIn/Out
HWVoiceIn/Out
3)
Reading a audio streams.. how it differs if we read some file data
(like reading from *.wav/*.mp4 etc) ? Do we still need to use AUD_read ?
4) What does audfmt_e enumeraion signifies ? is it for audio data in signed or unsigned form ?
5) What os the significance of channels parameter in audsettings structure ?
Thanks in advance !!
On Friday, September 5, 2014 5:28 PM, Harry Cruise <princeharry_89@yahoo.com> wrote:
Hi,
Thanks for the reply.. Kindly help me with few more queries..
I tried to understand the audio implementation in qemu from the sources you have suggested. Now, I am confused how audio emulation actually works.
The subject
On Thursday, September 4, 2014 1:32 PM, Gerd Hoffmann <kraxel@redhat.com> wrote:
On Do, 2014-09-04 at 00:22 -0700, Harry Cruise wrote:
> Hello,
>
>
> I am trying to comprehend QEMU AUDIO backend functionality and need to
> implementing device which has few audio channels from which it
> receives audio streams (sampled at some specific frequency), and
> further process that data stream like mixing two stream.
>
>
> I am new for the QEMU, Please help me in following queries:
>
>
> 1) Please suggest some document and example/device implement which has
> use qemu audio backend.
hw/usb/dev-audio.c (implementing usb speaker emulation) is probably the
best
sample code for that.
> 3) What steps I need to add into device to setup audio support as per
> the requirement I mentioned above ?
You can just create multiple streams. AUD_open_* returns a handle so
you can disturgist them.
> 4) what is the basic working flow of audio backend and accessing audio
> streams using dma ?
Nothing special for audio here, they do dma like any other device. You
don't see that in hw/usb/dev-audio.c though as DMA is handled elsewhere
(uhci/ehci/xhci usb host adapter emulation). You might want to look at
intel-hda for pci dma sample code.
HTH,
Gerd
is that I need to read the audio streams sampled at particular frequency into some device buffers, then do some process on data buffers and generate some output audio stream.
There are some API's and structs which I believe can be useful for above subject. But I could not understand what exactly it does, or simply how it works ?
1) AUD_read --> As fas as I understand this reads data from some HWVoiceIn structure member associated with SWVoiceIn structure.
Please help me in understanding what it does ?
Does it read data from some hardware (i.e. mic) , how I can test this in QEMU ?
2) AUD_write -> Does it sends data to the hardware (i.e., speaker) ?, again how I can test this in QEMU ?
For , above what I understand is that any hardware might have
associated buffer, and AUD_read/write api's read/write data from/to that buffers, and drivers associated with the hardware might managing it.
Is it possible that I can associate multiple SWVoiceOut to a single HWVoiceOut ?
What is the use of this structures:
SWVoiceIn/Out
HWVoiceIn/Out
3) Reading a audio streams.. how it differs if we read some file data (like reading from *.wav/*.mp4 etc) ? Do we still need to use AUD_read ?
Thanks in advance !!
[-- Attachment #2: Type: text/html, Size: 12690 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-06 19:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-04 7:22 [Qemu-devel] Audio stream handling in QEMU device model Harry Cruise
2014-09-04 8:00 ` Gerd Hoffmann
2014-09-05 11:55 ` Harry Cruise
2014-09-06 19:06 ` Harry Cruise
-- strict thread matches above, loose matches on Subject: below --
2014-09-03 19:37 Harry Cruise
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).