All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.co.uk>
To: mjander@users.sourceforge.net
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: SPDIF rate setting.
Date: Sun, 19 Sep 2004 12:44:50 +0100	[thread overview]
Message-ID: <414D7132.7010208@superbug.co.uk> (raw)
In-Reply-To: <1095555720.2290.10.camel@localhost>

Manuel Jander wrote:
> Hi James,
> 
> On Fri, 2004-09-17 at 16:00, James Courtier-Dutton wrote:
> 
>>It seems that more and more people are using SPDIF digital output at 
>>44.1khz. E.g. DTS tracks on CDs.
>>Currently, people are having to manually change the SPDIF rate setting 
>>using iecset or the application is having to play with AES3 in the 
>>"iec958:AES..." at device open.
>>How about, when someone opened the device "iec958" and then uses 
>>snd_pcm_hw_params_set_rate(), it should automatically set the iecset 
>>rate to equal the rate set by the set_rate function call.
>>
>>Any comments?
> 
> 
> There is a problem with that, because you are confusing output
> samplerate with the application data samplerate. The
> snd_pcm_hw_params_set_rate() is set according to the intended sample
> rate an application writes to a PCM device, but the samplerate of the
> SPDIF stream must be accordning to the external decoder you are using.
> If both are different, a soundcard may use some hardware samplerate
> converter to cope with that, or just set restriction which allow only
> the samplerate suitable to the decoder.
> 
> As i have mentioned some tiome ago, i thing there should be some sort of
> output device configuration, as an instance to collect and manage the
> information of what the Hell is conected to the output jacks of the
> users soundcard, and do some software management automatically according
> to that. That would allow us to do automatic 5.1 to stereo downmix,
> stereo to 5.1 upmix, format output correctly in case of SPDIF output,
> arrange channels according to the speaker layout, etc.
> 
> Best Regards
> 
> Manuel Jander
> 

I think it is you who are confused. If a device gets opened with device 
name "iec958:AES...", sample rate converters are disallowed, so the 
application rate will equal the hardware spdif rate.
If the device name is "front" or "default", sample rate converters are 
allowed.
Also, the sound card does not have to match the external decoder, it is 
the other way round, the sound cards sets a rate, and the external 
decoder just matches it. All external decoders can auto sense 44.1 kHz 
and 48 kHz.

James



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

  reply	other threads:[~2004-09-19 11:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-17 20:00 SPDIF rate setting James Courtier-Dutton
2004-09-19  1:02 ` Manuel Jander
2004-09-19 11:44   ` James Courtier-Dutton [this message]
2004-09-24 13:45 ` 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=414D7132.7010208@superbug.co.uk \
    --to=james@superbug.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=mjander@users.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.