Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Geraldo Nascimento <geraldogabriel@gmail.com>
To: Ruud van Asseldonk <ruud@veniogames.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Regression playing 24bit/96kHz audio on USB audio interface between 5.10.94 and 5.15.21
Date: Sun, 11 Dec 2022 18:08:19 -0300	[thread overview]
Message-ID: <Y5ZGw/3GHXSUduEc@geday> (raw)
In-Reply-To: <9da2f631-4b45-9c5e-4349-488eea9436aa@veniogames.com>

On Sun, Dec 11, 2022 at 04:30:11PM +0100, Ruud van Asseldonk wrote:
> Hi all,
> 
> This issue is still present in 5.15.82, is there anything I can do to 
> diagnose this further?

Hi Ruud,

Sorry for your troubles. You could use "git bisect" to try to pinpoint
the exact commit that introduces failure for you.

Thanks,
Geraldo Nascimento

> 
> Best,
> 
> Ruud van Asseldonk
> 
> > 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

  reply	other threads:[~2022-12-11 21:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06 22:18 Regression playing 24bit/96kHz audio on USB audio interface between 5.10.94 and 5.15.21 Ruud van Asseldonk
2022-12-11 15:30 ` Ruud van Asseldonk
2022-12-11 21:08   ` Geraldo Nascimento [this message]
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=Y5ZGw/3GHXSUduEc@geday \
    --to=geraldogabriel@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ruud@veniogames.com \
    /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