alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: stan <stanl@cox.net>
To: alsa-devel@alsa-project.org
Subject: Re: Hidden rate conversion, and Alsa configuration
Date: Fri, 27 Jul 2007 13:48:11 -0700	[thread overview]
Message-ID: <20070727134811.32df703c@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.61.0707272207010.7596@tm8103-a.perex-int.cz>

On Fri, 27 Jul 2007 22:16:44 +0200 (CEST)
Jaroslav Kysela <perex@suse.cz> wrote:

> On Fri, 27 Jul 2007, stan wrote:
> 
> > I really want to avoid rate resampling if I can, while format
> > conversion has to occur somewhere in order to match the hardware in
> > most cases.  I assume that any format conversion alsa does
> > is at least as good as one I would do myself.  While the rate
> 
> Not really. If application knows all things, the final code might be
> much more optimized. Alsa-lib has all plugins universal (thus mostly 
> unoptimized). For example - attenuation + sample conversion can be 
> implemented together, but alsa-lib has two plugins - it means two 
> iteration over same data.
> 

I'll have to do some thinking about the tradeoffs of coding time against
throughput optimization.
 
> > resampling can introduce throughput issues and inaccuracies in the
> > sound stream.
> 
> I answered this numerous times on this list. We have a function to
> notify the plugins that resampling should be avoided - it's 
> snd_pcm_hw_params_set_rate_resample().

Sorry for the repeat.  Once I see it, I remember seeing it before.

> 
> hw:x,y,z 		- native device without any conversions
> plughw:x,y,z		- device trying to do all conversions for
> applications 
> default			- default device with
> all conversions (mostly pointing to plughw:x,y,z)
> 
> And yes, plugin doing all conversions is named "plug". So anywhere
> where "plug" plugin is used, other plugins - including the rate
> plugin - can be dynamically inserted to satisfy application
> requirements.
> 
> 						Jaroslav

Thanks for your answers Jaroslav, that clears it up for me.

  reply	other threads:[~2007-07-27 20:48 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16 12:40 SALSA and aplay Alan Horstmann
2007-07-16 12:30 ` Takashi Iwai
2007-07-17 11:33   ` Alan Horstmann
2007-07-17 11:58     ` Takashi Iwai
2007-07-17 14:38       ` Alan Horstmann
2007-07-17 15:09         ` Takashi Iwai
2007-07-18 15:01           ` Alan Horstmann
2007-07-18 16:20             ` Alan Horstmann
2007-07-19  9:33               ` Takashi Iwai
2007-07-19 14:24                 ` John Rigg
2007-07-19 14:27                   ` Takashi Iwai
2007-07-19 15:40                     ` John Rigg
2007-07-20 12:33                   ` Hidden rate conversion, and Alsa configuration Alan Horstmann
2007-07-22 19:56                     ` stan
2007-07-23  8:15                       ` Jaroslav Kysela
2007-07-23 13:37                         ` stan
2007-07-27 16:20                     ` Alan Horstmann
2007-07-27 15:59                       ` Lee Revell
2007-07-27 17:37                         ` stan
2007-07-27 19:38                           ` Lee Revell
2007-07-27 20:03                             ` stan
2007-07-27 20:16                               ` Jaroslav Kysela
2007-07-27 20:48                                 ` stan [this message]
2007-08-03 14:03                                 ` Alan Horstmann
2007-08-03 14:29                                   ` James Courtier-Dutton
2007-08-03 15:11                                     ` Takashi Iwai
2007-08-03 21:56                                       ` Alan Horstmann
2007-07-27 17:53                         ` stan
2007-07-27 18:29                           ` stan
2007-07-27 16:18                       ` Takashi Iwai
2007-07-19  9:30             ` SALSA and aplay Takashi Iwai
2007-07-20 11:57               ` Alan Horstmann
2007-07-20 12:10                 ` Takashi Iwai
2007-07-20 15:20                   ` Alan Horstmann
2007-07-20 15:06                     ` Takashi Iwai

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=20070727134811.32df703c@localhost.localdomain \
    --to=stanl@cox.net \
    --cc=alsa-devel@alsa-project.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).