All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: George Boutsioukis <gboutsioukis@gmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Xen PV audio XenStore
Date: Wed, 6 Jul 2011 09:15:02 -0400	[thread overview]
Message-ID: <20110706131502.GB3454@dumpdata.com> (raw)
In-Reply-To: <CANnAuxCF_5FAW=h-az_2gDvkPfFA=UyVTxhhjB0QYU4R682epQ@mail.gmail.com>

On Tue, Jul 05, 2011 at 08:53:29PM +0200, George Boutsioukis wrote:
> On Tue, Jul 5, 2011 at 4:54 PM, Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
> > On Tue, Jul 05, 2011 at 01:02:08PM +0100, Ian Campbell wrote:
> >> On Mon, 2011-07-04 at 23:16 +0100, George Boutsioukis wrote:
> >> > Hello everyone, as some of you may remember there is a GSoC project

I am not sure why, but you dropped the xen-devel from this response.

I've added that back in.

> >> > this year to implement a paravirtualized audio driver and I am the
> >> > student undertaking this effort.
> >> >
> >> > As the rest of the PV audio drivers, my frontend uses XenStore to pass
> >> > the event channel & grant reference to the backend, along with a few
> >> > configuration data. Although the driver is far from usable, the
> >> > XenStore layout is not going to change much in the future, so I think
> >> > it would be useful to describe it to the community.
> >> >
> >> > First of all, although the frontend is implemented in userspace, I
> >> > tried to follow the scheme used by the rest of the PV drivers. This
> >> > looks something like:
> >> >
> >> > /local/domain/<domID>/device/audio/<devID>/event-channel
> >> > /local/domain/<domID>/device/audio/<devID>/ring-ref
> >> > /local/domain/<domID>/device/audio/<devID>/format
> >> > /local/domain/<domID>/device/audio/<devID>/rate
> >> > /local/domain/<domID>/device/audio/<devID>/channels
> >
> > And "format" is...? string? What does it look like?
> 
> It's a string. There are only a handful of common PCM formats; they
> look like this: S16LE(signed 16-bit integer, low endian), U8 for 8-bit
> unsigned etc. A good reference is the ALSA documentation:
> 
> http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#g3df0b888477ce2dc3817d9095db859b1
> 
> Exactly which ones will be used depends on what the backend sound API
> can support. Pulseaudio(used currently by the backend) supports a
> smaller subset, but it is obviously enough for the current, also
> pulseaudio, frontend.
> 
> >> >
> >> > where devID is a unique device ID for the guest system.
> >
> > Could you provide an example of what this layout looks like for
> > stereo microphone (each channel is 8bit-unsigned, 44Khz) and
> > 5.1 channel output with 48Khz of ulaw-16bit signed?
> >
> 
> Ah, I guess I should a parameter to declare the device as output or
> input. Something like type="sink"/"source" should be enough. So, the
> layout for these examples would be:
> 
> /local/domain/<domID>/device/audio/<devID>/format = "U8"
> /local/domain/<domID>/device/audio/<devID>/rate = 44000
> /local/domain/<domID>/device/audio/<devID>/channels = 2
> /local/domain/<domID>/device/audio/<devID>/type = "source"
> 
> /local/domain/<domID>/device/audio/<devID>/format = "MU_LAW"
> (not sure if ulaw-16bit signed exists, but I guess it would be
> something similar to MU_LAW_S16LE?)
> /local/domain/<domID>/device/audio/<devID>/rate = 48000
> /local/domain/<domID>/device/audio/<devID>/channels = 6
> /local/domain/<domID>/device/audio/<devID>/type = "sink"
> 
> Of course a 5.1 scheme might likely need a channel-to-speaker map, but
> this can be handled through the dom0 sound server.
> 
> 
> -- 
> George Boutsioukis
> gboutsioukis@gmail.com

  parent reply	other threads:[~2011-07-06 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04 22:16 Xen PV audio XenStore George Boutsioukis
2011-07-05 12:02 ` Ian Campbell
2011-07-05 14:54   ` Konrad Rzeszutek Wilk
     [not found]     ` <CANnAuxCF_5FAW=h-az_2gDvkPfFA=UyVTxhhjB0QYU4R682epQ@mail.gmail.com>
2011-07-06 13:15       ` Konrad Rzeszutek Wilk [this message]
     [not found]       ` <20110706131429.GA3454@dumpdata.com>
2011-07-06 13:15         ` Konrad Rzeszutek Wilk
     [not found]   ` <CANnAuxCKWduOkkd6Kh6-_7Eo-R9hoWed4iZbu4R0oOGcV2_gjQ@mail.gmail.com>
2011-07-06  8:31     ` Ian Campbell
2011-07-07  7:31       ` George Boutsioukis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110706131502.GB3454@dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=gboutsioukis@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.