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: Sun, 22 Jul 2007 12:56:39 -0700	[thread overview]
Message-ID: <20070722125639.350d6a11@localhost.localdomain> (raw)
In-Reply-To: <200707201333.38449.gineera@aspect135.co.uk>

On Fri, 20 Jul 2007 13:33:38 +0100
Alan Horstmann <gineera@aspect135.co.uk> wrote:

[snip]

> I have less concern with dmix than the hidden rate conversion, but
> would happily loose both.  Using "hw" forces use of 12 capture and 10
> playback channels in this case, doesn't it?  So I need some plugin to
> play 2 channels?
> 
> There are 2 issues for me:
> 
> 1. With the cards rate state = 'locked' alsa (not sure what bit of
> it) was unable to set the desired clock rate, yet did not report an
> error.  Data was then eg captured from the card as if it was running
> at 48K, but actually it remained at 44.1K.  Thus the recorded data
> was wrong.
> 
> snd_pcm_hw_params_set_rate_near(..)
> 
> did not report error because it was asking for 44.1K; somewhere else
> the configuration decided 48K was better, but did not highlight that
> the card refused to change setting.  Surely this should class as a
> bug.
> 
> Since the inverse error happens on capture, it is not immediately
> obvious that there is a problem with the recording, so important
> recordings could be completely messed up.
> 
> 2. These ice1712-based pro/semi-pro hardware systems should IMO NEVER
> perform secret rate conversion.  They are designed for readers of
> 'Sound on Sound' etc, and Paul White et al would rightly blast
> M-Audio or Terratec if their Windows drivers quietly set the card to
> a different rate to that requested and rate converted the data!
> Especially so on a capture stream.  Remember the cards are 24-bit
> 96KHz capable and approach 100dB signal-to-noise ratio.
> 
> Whilst there may be circumstances in which material recorded at
> different rates has to be used in the same project, it is only
> converted once, in full knowledge.
> 
> Can't dmix be configured to run at whatever rate is set on the card,
> or the requested rate, rather than attempt to overule both of them?
> 
> Alan

For what it's worth, I agree with Alan here.  Any sound library with
aspirations to professional use can't have hidden conversions and
silent corrections going on.

However, I also agree with Takashi that for the average user having the
dmix plugin as a default is a very good thing.

So, would it be possible to have an api call in the interface to
disable the dmix plugin for any instance of alsa.  For example,  I call
the interface to open the default sound device.  Another call gets me
the hardware associated with the default device.  I then tell the
interface to bypass any filters or plugins, basically giving access to
the hw interface for whichever card is default for this stream only.

Maybe this already exists.  If it does, could you point me in the right
direction (which function).  If not, where would it be best implemented
(which source file)?  I don't know that I could or will write it, but I
would like to have a look at how difficult it would be.

Thanks.
stan

  reply	other threads:[~2007-07-22 19:56 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 [this message]
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
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=20070722125639.350d6a11@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).