From: Ruud van Asseldonk <ruud@veniogames.com>
To: alsa-devel@alsa-project.org
Subject: Regression playing 24bit/96kHz audio on USB audio interface between 5.10.94 and 5.15.21
Date: Sun, 6 Mar 2022 23:18:04 +0100 [thread overview]
Message-ID: <4e509aea-e563-e592-e652-ba44af6733fe@veniogames.com> (raw)
Hi,
I have a program that configures a Behringer UMC404HD 192k USB audio
interface for playback as follows (pseudocode):
snd_pcm_hw_params_set_channels(pcm, hwp, 2);
snd_pcm_hw_params_set_format(pcm, hwp, SND_PCM_FORMAT_S24_3LE);
snd_pcm_hw_params_set_access(pcm, hwp, SND_PCM_ACCESS_MMAP_INTERLEAVED);
snd_pcm_hw_params_set_rate(pcm, hwp, val=96000, dir=0);
snd_pcm_hw_params_set_period_size_near(pcm, hwp, val=513, dir=0);
// If I confirm at this point with snd_pcm_hw_params_get_period_size,
// I get back 513.
snd_pcm_hw_params_set_buffer_size_near(pcm, hwp, val=2052);
snd_pcm_hw_params(pcm, hwp);
// If I confirm with snd_pcm_hw_params_get_buffer_size,
// I get back 2052.
On Linux 5.10.94 (specifically Arch Linux ARM package
linux-rpi-5.10.94-1), this succeeds, and I can play back audio just
fine. On 5.15.21 (specifically linux-rpi-5.15.21-3), all the calls
succeed apart from the last one, which returns EINVAL.
(My actual program is written in Rust and uses a Rust wrapper library
for libasound, https://docs.rs/alsa/0.6.0/alsa/, but the calls should be
the ones listed.)
I confirmed with snd_pcm_hw_params_test_format that the S24_3LE format
is supported. On both kernels it is successful. I confirmed with
snd_pcm_hw_params_test_rate that 96 kHz is supported. On both kernels it
is successful. There are differences though. When I query these:
snd_pcm_hw_params_get_period_size_min
snd_pcm_hw_params_get_period_size_max
snd_pcm_hw_params_get_buffer_size_min
snd_pcm_hw_params_get_buffer_size_max
Then on 5.10.94 (the good version), I get:
period size min/max: 12/32768, buffer size min/max: 24/65536
But on 5.15.21 (the bad version), I get:
period size min/max: 13/71332, buffer size min/max: 26/142663
Also, after I set the period size to 513, if I then query the buffer
size min/max, on 5.10.94 I get:
buffer size min/max: 1026/65536
But on 5.15.21 I get:
buffer size min/max: 1027/142663
In lsmod, snd_usb_audio shows up, and from lsusb -v, the UMC404HD
appears to be a standard USB audio interface. The lsusb output is
identical on both kernels.
Please let me know if there is anything I can do to help further
diagnose the issue, or if I should report this elsewhere.
Kind regards,
Ruud van Asseldonk
next reply other threads:[~2022-03-07 8:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-06 22:18 Ruud van Asseldonk [this message]
2022-12-11 15:30 ` Regression playing 24bit/96kHz audio on USB audio interface between 5.10.94 and 5.15.21 Ruud van Asseldonk
2022-12-11 21:08 ` Geraldo Nascimento
2022-12-12 9:48 ` Thorsten Leemhuis
2022-12-12 12:41 ` Jaroslav Kysela
2022-12-30 18:42 ` Ruud van Asseldonk
2022-12-31 11:38 ` Ruud van Asseldonk
2022-12-31 12:03 ` Thorsten Leemhuis
2022-12-31 12:10 ` Jaroslav Kysela
2022-12-31 13:20 ` Takashi Iwai
2023-01-02 16:57 ` 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=4e509aea-e563-e592-e652-ba44af6733fe@veniogames.com \
--to=ruud@veniogames.com \
--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