Re: Bug: Hardware that does not support s32le - sndiod -dd shows s16le

From: Alexandre Ratchov <alex_at_caoua.org>
Date: Fri Sep 22 2017 - 11:49:46 CEST
On Wed, Sep 20, 2017 at 03:00:53PM +0000, Edward Wandasiewicz wrote:
> If I run
> 
> $ mplayer -ao alsa:device=hw=1 -af format=s32le _AUDIO_ONLY_FILE_
> 
> On my Chromebook Pixel 2015, mplayer responds with
> 
> [AO_ALSA] Format s32le is not supported by hardware, trying default.
> AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
> 
> Audio plays fine.
> 
> I try s32le in 2 different ways, in my $HOME/.asoundrc file,
> 
> =============================
> Method 1 - set s32_le in type slave { }
> =============================
> 
> $ cat $HOME/.asoundrc
> 
> pcm.sndio {
> type asym
> playback.pcm "sndio-play"
> 
> hint {
> show on description "OpenBSD sndio"
> }
> }
> 
> pcm.sndio-play {
> type plug
> slave {
> pcm "sndio-raw"
> rate 48000
> format s32_le
  ^^^^^^^^^^^^^
> channels 2
> }
> }
> 
> pcm.sndio-raw {
> type file
> slave.pcm null
> 
> format raw
> file "| aucat -f snd/0 -i -"
          ^^^^^^^^^^^^^^^^

aucat can't guess the format of data on the pipe, by default it uses s16 (or whatever
it was compiled with).

In case defaults change, it's better to always specify the format,
when it can't be determined, ex:

aucat -f snd/0 -e s32le -r 48000 -c 0:1 -i -

[...]

Note that as sndiod runs in 16-bit mode, feeding it with 32-bit
samples only triggers format conversions without no quality benefit.
Received on Fri, 22 Sep 2017 11:49:46 +0200

This archive was generated by hypermail 2.1.8 : Wed Nov 08 2017 - 16:31:34 CET