All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giuliano Pochini <pochini@shiny.it>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: RE: trigger problems.
Date: Wed, 14 Jul 2004 15:36:22 +0200 (CEST)	[thread overview]
Message-ID: <XFMail.20040714153622.pochini@shiny.it> (raw)
In-Reply-To: <40F52C9D.60704@superbug.demon.co.uk>


On 14-Jul-2004 James Courtier-Dutton wrote:
> I am writing a alsa driver for the audigyls and p16v.
> The output on these sound cards can work in 1 of two ways.
> 1) 1 substream with 8 channels, and one interrupt request per period.
> For 5.1 output, we just use alsa.conf to map the user's application 
> channels into the correct channels of the 8 channel substream.

This is the simplest method of handling several channels, but you
waste some of them.


> 2) 4 substreams with 2 channels each.
> For 5.1 output, we just use 3 substreams, front, rear, center_lfe.
> The problem with this is that we then have a separate interrupt per
> substream, resulting in 3 times more interrupts. The substreams are also
> not in sample sync with each other, because the trigger for each
> substream is executed one after the other, instead of in one go.

You lose stereo image if the channels are out of sync. It also depends
on how much they are. It's generally a bad thing.


> So, because of this, I have a feature request for alsa-driver.
> If a user app opens the sound device in such a way that a single stream 
> from the app gets converted into multiple substreams to the same sound 
> card hardware, can we have a single trigger call for all substreams.

It's already possible. Grep the drivers sources for snd_pcm_set_sync()
and snd_pcm_trigger_done().  Some of them already use that feature.
Also, userspace must explicitly use it.  Have a look at the example
program latency.c (alsa-tools ?)


--
Giuliano.


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com

      parent reply	other threads:[~2004-07-14 13:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-14 12:52 trigger problems James Courtier-Dutton
2004-07-14 12:51 ` Jaroslav Kysela
2004-07-14 13:28 ` Takashi Iwai
2004-07-17 22:37   ` James Courtier-Dutton
2004-07-14 13:36 ` Giuliano Pochini [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=XFMail.20040714153622.pochini@shiny.it \
    --to=pochini@shiny.it \
    --cc=James@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /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.