From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPRz7-0007Nc-36 for qemu-devel@nongnu.org; Thu, 04 Sep 2014 04:01:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPRyx-0003kz-BC for qemu-devel@nongnu.org; Thu, 04 Sep 2014 04:01:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPRyx-0003kr-3B for qemu-devel@nongnu.org; Thu, 04 Sep 2014 04:01:27 -0400 Message-ID: <1409817657.19513.3.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Thu, 04 Sep 2014 10:00:57 +0200 In-Reply-To: <1409815341.80202.YahooMailNeo@web141206.mail.bf1.yahoo.com> References: <1409815341.80202.YahooMailNeo@web141206.mail.bf1.yahoo.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Audio stream handling in QEMU device model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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