[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Audio stream handling in QEMU device model
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] Audio stream handling in QEMU device model |
Date: |
Thu, 04 Sep 2014 10:00:57 +0200 |
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