missing sound on kernel-5.15

GitHub issues - opened github at alsa-project.org
Mon Aug 22 08:45:50 CEST 2022


alsa-project/alsa-lib issue #264 was opened from chihhao-chen:

I am testing many types of headsets on Android platform with different kernel versions.

On kernel-5.10, calling sequence before playback is
snd_usb_hw_params -> set highest sampling rate, no SAMPLING_FREQ_CONTROL USB request in this stage
snd_pcm_release
snd_usb_hw_params -> set proper sampling rate, still no SAMPLING_FREQ_CONTROL USB request 
snd_usb_pcm_parepare -> in configure_endpoint SAMPLING_FREQ_CONTROL USB request  was sent

With the same calling sequence, a slightly behavior change on kernel-5.15 is
snd_usb_hw_params -> set highest sampling rate, SAMPLING_FREQ_CONTROL USB request  was sent
snd_pcm_release
snd_usb_hw_params -> set proper sampling rate, SAMPLING_FREQ_CONTROL USB request  was sent too
(because configure_endpoint was moved to snd_usb_hw_params function)
snd_usb_pcm_parepare -> no SAMPLING_FREQ_CONTROL USB request  because of USB EP flag check

I checked all USB packets and confirmed audio data output was correct.
But there may be missing sound problem for the first sound with many headsets (for example Samsung headset).
I found this issue is related to two-times sampling rate set request.
(I tried forcibly skip first USB request, everything became okay.)
So do you guys know why configure_endpoint was moved to snd_usb_hw_params?
Or could you provide patch for this problem?

Many thanks
Chihhao

Issue URL     : https://github.com/alsa-project/alsa-lib/issues/264
Repository URL: https://github.com/alsa-project/alsa-lib


More information about the Alsa-devel mailing list