Re: [pulseaudio-discuss] Alternate sample rates

2011-10-18 Thread Wang Xingchao
2011/10/18 Arun Raghavan :
> Hello,
> I just pushed a bunch of patches by Pierre Louis-Bossart to introduce an
> on-by-default alternate-sample-rate to configuration in addition to
> default-sample-rate. This was discussed earlier this year on list[1].
> There's some more information on my blog[2].

Very Cool feature!  Why not change sample_spec totally according to
sink's availability, but only sample rate? The default sample_spec
used at initialization, if alsa driver supports various formats/rates,
 PA could change sink's sample_spec in order to fit sink-input's
request. Is there any risk or my misunderstanding ?

--xingchao
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Alternate sample rates

2011-10-18 Thread Pierre-Louis Bossart
> Very Cool feature!  Why not change sample_spec totally according to
> sink's availability, but only sample rate? The default sample_spec
> used at initialization, if alsa driver supports various formats/rates,
>  PA could change sink's sample_spec in order to fit sink-input's
> request. Is there any risk or my misunderstanding ?

These patches do not always use the rate of the client. This only happens
when there's a exact match. In case of a difference between the client rate
and the sink rates, SRC will be used. These set of patches are mostly
intended to make SRC easier (integer ratios) or unnecessary. One of the main
goals was for example that voice calls would be resampled to 48kHz instead
of 44.1kHz, since a 3x or 6x resampling takes less resources.
But to your point we've discussed with Arun of dynamically updating the
number of channels supported for HDMI outputs. When the EDID/ELD is read, we
could use the information to automatically make the output multichannel, and
possibly set a higher sampling rate.
-Pierre 

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Alternate sample rates

2011-10-19 Thread Wang Xingchao
2011/10/18 Pierre-Louis Bossart :
>> Very Cool feature!  Why not change sample_spec totally according to
>> sink's availability, but only sample rate? The default sample_spec
>> used at initialization, if alsa driver supports various formats/rates,
>>  PA could change sink's sample_spec in order to fit sink-input's
>> request. Is there any risk or my misunderstanding ?
>
> These patches do not always use the rate of the client. This only happens
> when there's a exact match. In case of a difference between the client rate
> and the sink rates, SRC will be used. These set of patches are mostly
> intended to make SRC easier (integer ratios) or unnecessary. One of the main
> goals was for example that voice calls would be resampled to 48kHz instead
> of 44.1kHz, since a 3x or 6x resampling takes less resources.
> But to your point we've discussed with Arun of dynamically updating the
> number of channels supported for HDMI outputs. When the EDID/ELD is read, we
> could use the information to automatically make the output multichannel, and
> possibly set a higher sampling rate.
> -Pierre
>

Thanks your clarification, Pierre!  :)

--xingchao
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Alternate sample rates

2011-10-19 Thread Arun Raghavan
On Tue, 2011-10-18 at 03:38 -0400, Wang Xingchao wrote:
> 2011/10/18 Arun Raghavan :
> > Hello,
> > I just pushed a bunch of patches by Pierre Louis-Bossart to introduce an
> > on-by-default alternate-sample-rate to configuration in addition to
> > default-sample-rate. This was discussed earlier this year on list[1].
> > There's some more information on my blog[2].
> 
> Very Cool feature!  Why not change sample_spec totally according to
> sink's availability, but only sample rate? The default sample_spec
> used at initialization, if alsa driver supports various formats/rates,
>  PA could change sink's sample_spec in order to fit sink-input's
> request. Is there any risk or my misunderstanding ?

Just to add to what Pierre said, another thing to consider with these
patches is that unless we can switch sample rates at arbitrary times,
this patch allows some streams to "hog" the device at a particular
sample rate and format. You might not want a corked 96 kHz float32
stream holding your device at that format when a voip stream comes in
trying to do 8 kHz mono.

That is a pathological case, but until I'd prefer to solve for this sort
of behaviour (at least to the extent that corked streams don't block
rate updates) before considering arbitrary sample rate and format
changes.

Cheers,
Arun

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss