All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: "Nikita V. Youshchenko" <yoush@cs.msu.su>
Cc: alsa-devel@alsa-project.org
Subject: Re: Hardware audio decoder driver design
Date: Thu, 28 Jul 2011 18:05:47 +0200	[thread overview]
Message-ID: <4E3188DB.9040706@ladisch.de> (raw)
In-Reply-To: <201107281910.10535@zigzag.lvk.cs.msu.su>

Nikita V. Youshchenko wrote:
> > Nikita V. Youshchenko wrote:
> > > If not going into details, that devices reads A52-encoded stream
> > > from system memory, and writes raw pcm stream to system memory.
> > >
> > > Simplest thing to do is - implement a character device, where
> > > user-space will write encoded stream, and from where user-space will
> > > read decoded stream.
> > >
> > > However, perhaps a better architecture (e.g. in-kernel intergation
> > > with an audio sink) is possible?
> >
> > One of the implicit assumptions of ALSA sound devices is that they run
> > in real time, and at a constant bit rate.  As far as I can tell, your
> > device would be 'just' a DSP, so a character device would be
> > appropriate.
> 
> But there is such thing as 'ac3 passthrough' - to make use of hardware ac3
> decoders on sound cards that have this feature.

It's more intended to be used to transport AC-3 data over a S/PDIF cable
where the decoder is _not_ in the computer itself.

> I was thinking that something similar could be done for 'our device +
> standard alsa driver' combination - to make use of existing software using
> that interface.

This would be possible, but it would result in a userspace ALSA plugin
that still has to access your device with some private API.

Building a kernel driver with virtual playback/capture devices would
be harder because there isn't an official API to access other sound
devices in kernel space.  (However, the OSS emulation has some sample
format conversion plugins that do something like this.)


Regards,
Clemens

      parent reply	other threads:[~2011-07-28 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 15:10 Hardware audio decoder driver design Nikita V. Youshchenko
2011-07-28 15:56 ` Koul, Vinod
2011-07-28 16:05 ` Clemens Ladisch [this message]

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=4E3188DB.9040706@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=yoush@cs.msu.su \
    /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.