alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
366 stars 177 forks source link

Sample rate issues with M-Audio M-Track 2x2M #176

Closed powerjungle closed 3 years ago

powerjungle commented 3 years ago

At random points the sample rate changes, but the applications continue to use the previous rate. This results in sound being lower/higher pitch then normal. My own voice when using the application Mumble consistently becomes higher pitch and sounds pretty funny, friends had a good laugh. I have some diffs of ALSA dumps.

My output is to headphones. My input is XLR.

Here for example I open the GNOME settings for "Sound" and my output becomes lower pitch:

6c6
< !!Script ran on: Sun Aug 29 19:56:57 UTC 2021
---
> !!Script ran on: Sun Aug 29 19:58:27 UTC 2021
1287c1287
<     Momentary freq = 48000 Hz (0x6.0000)
---
>     Momentary freq = 44101 Hz (0x5.8338)
1304c1304,1308
<   Status: Stop
---
>   Status: Running
>     Interface = 2
>     Altset = 1
>     Packet Size = 72
>     Momentary freq = 44100 Hz (0x5.8333)
1346c1350
< crw-rw----+ 1 root audio 116, 12 Aug 29 21:15 /dev/snd/pcmC1D0c
---
> crw-rw----+ 1 root audio 116, 12 Aug 29 21:58 /dev/snd/pcmC1D0c
1400c1404
<   Subdevices: 1/1
---
>   Subdevices: 0/1
2057,2058c2061,2062
<       value.0 0
<       value.1 0
---
>       value.0 3
>       value.1 4

Afterwards at a random point the output gets fixed, but the sample rate that gets logged is weird:

6c6
< !!Script ran on: Sun Aug 29 19:58:27 UTC 2021
---
> !!Script ran on: Sun Aug 29 20:33:14 UTC 2021
78c78
<       Running - No
---
>       Running - Yes
1287c1287
<     Momentary freq = 44101 Hz (0x5.8338)
---
>     Momentary freq = 47999 Hz (0x5.fff8)
1304,1308c1304
<   Status: Running
<     Interface = 2
<     Altset = 1
<     Packet Size = 72
<     Momentary freq = 44100 Hz (0x5.8333)
---
>   Status: Stop
1351c1347
< crw-rw----+ 1 root audio 116, 11 Aug 29 21:56 /dev/snd/pcmC1D0p
---
> crw-rw----+ 1 root audio 116, 11 Aug 29 22:32 /dev/snd/pcmC1D0p
1404c1400
<   Subdevices: 0/1
---
>   Subdevices: 1/1
2061,2062c2057,2058
<       value.0 3
<       value.1 4
---
>       value.0 0
>       value.1 0

Also sometimes when listening to music in Youtube using Firefox, the sound becomes higher pitch, but I cannot reproduce it, can't find the cause.

I'm running OpenSUSE Tumbleweed 5.13.13-1-default.

powerjungle commented 3 years ago

Sorry didn't realize this isn't the place to report such a bug.