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

From: Edward Wandasiewicz <w13ntd_at_gmail.com>
Date: Wed, 20 Sep 2017 15:36:38 +0000
On Wed, Sep 20, 2017 at 3:18 PM, Edward Wandasiewicz <w13ntd_at_gmail.com> wrote:
> On Wed, Sep 20, 2017 at 3:00 PM, Edward Wandasiewicz <w13ntd_at_gmail.com> 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 -"
>> }
>>
>> pcm.default sndio
>>
>> =======================
>> Method 2 - set s32_le in aucat
>> =======================
>>
>> Comment out rate, format and channels in slave { }
>
> # rate 48000
> # format s32_le
> # channels 2
>
> and append these values to the aucat command in pcm.sndio-raw { }
>
> file "| aucat -r 48000 -e s32le -C 0:1 -f snd/0 -i -"
>
> In both instances of these 2 different .asoundrc config files, I then run
>
> $ mplayer -ao alsa:device=sndio -af format=s32le _AUDIO_ONLY_FILE_
>
> mplayer shows
>
> AO: [alsa] 48000Hz 2ch s32le (4 bytes per sample)
> [Mixer] No hardware mixing, inserting volume filter.
>
> but the output from
>
> $ sndiod -dd -f rsnd/1 shows
>
> snd0: 48000Hz, s16le, play 0:1, rec 0:1, 8 blocks of 1024 frames
> aucat0: 48000Hz, s16le, play 0:1, 9 blocks of 1024 frames
> snd0: device started
>
> with
>
> $ sudo ps -ax | grep aucat
>  1690 pts/0    S+     0:00 aucat -r 48000 -e s32le -c 0:1 -f snd/0 -i -
>
> Question: Should the output of sndiod -dd show a message indicating
> s32le not supported by hardware, changing to s16le
>
> In both instances, even though the debug message shows s16le, the
> stream output sounds different from both .asoundrc config files, and I
> would expect them both to sound the same, as they both attempt to use
> s32le.
>
> If sndiod is using s16le, as shown in the debug message, neither sound
> output from the 2 different .asoundrc files sounds like the stream if
> I set the encoding to s16le in the .asoundrc file in either slave { }
> or aucat command.
>

Mistake. Setting se16 in the aucat command in .asoundrc does not sound
the same as se16 in slave { }.

se16 in slave{ } plays the audio in the correct tone, pitch and speed.

Should they sound the same, similar to the se32 scenario?

> For the sake of completeness, both .asoundrc config files using se16
> in slave { } and aucat appear to sound the same.
Received on Wed Sep 20 2017 - 17:36:38 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 09 2022 - 16:23:47 CEST