Bug 219567 - Yamaha THR5 popping sounds during playback
Summary: Yamaha THR5 popping sounds during playback
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: AMD Linux
: P3 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-06 03:36 UTC by Jaakko Salo
Modified: 2025-02-22 01:42 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa-info output with stock Ubuntu 24.04.1 kernel (69.94 KB, text/plain)
2024-12-06 03:38 UTC, Jaakko Salo
Details
alsa-info output with Ubuntu 24.04.1 + linux-sound 6.12.0-rc7 + patch (118.49 KB, text/plain)
2024-12-06 03:39 UTC, Jaakko Salo
Details
Patch to add implicit FB quirk for Yamaha THR5 (1.12 KB, patch)
2024-12-06 03:42 UTC, Jaakko Salo
Details | Diff

Description Jaakko Salo 2024-12-06 03:36:34 UTC
When Yamaha THR5 is used as a USB audio interface, playback produces a popping sound every few seconds. Here is an example capture with a 100 Hz tone playing in the background: https://drive.google.com/file/d/1ZVatviBvHuarDIGIy8AoJiYbwEpOedn4/view?usp=drive_link

A workaround is to force implicit feedback mode with 'snd-usb-audio.implicit_fb=1'. I have tested that recording still works with this option enabled. Without 'implicit_fb', the device lacks a feedback source.

I wrote a patch to snd-usb-audio quirks to enable implicit FB for the THR5. I have attached the following outputs from 'alsa-info':
- alsa-info.txt - Stock Ubuntu 24.04.1 system
- alsa-info-implicit-fb.txt - Ubuntu 24.04.1 + linux-sound 6.12.0-rc7 + implicit FB patch applied for THR5

This problem only seems to reproduce on certain hardware combinations.

Affected host system:
- Motherboard: ASRock B650i Lightning Wifi
- CPU: AMD Ryzen 7950X3D
- Memory: 64 GB DDR5 6000 MHz
- OS: Ubuntu 24.04.1 / kernel 6.8.0-49-generic

Additionally, the following systems were tested (stock kernel unless noted):
- Buggy:
  - ASRock B650i Lightning Wifi + Ubuntu 24.04.1 linux-sound 6.12.0-rc7 + Yamaha THR5
  - ASRock B650i Lightning Wifi + Ubuntu 20.04.6 + Yamaha THR5

- Working:
  - ThinkPad X1 Carbon Gen7 + Ubuntu 24.04.1 + Yamaha THR5
  - ASUS VivoPC X Intel® Core™ i5 7300HQ + Ubuntu 24.04.1 + Yamaha THR5
  - ASRock B650i Lightning Wifi + Windows 11 + Yamaha THR5
  - ASRock B650i Lightning Wifi + Ubuntu 24.04.1 + Boss Katana Air

The tests were conducted using 'aplay' with a 100 Hz tone @ 44.1 kHz with no other workload running except the Ubuntu desktop. I have not spotted any errors or warnings in system or user journal, or 'aplay' output, during playback. I used the following configuration to increase logging verbosity:
- 'echo "file sound/* +p" > /sys/kernel/debug/dynamic_debug/control'
- 'echo 8 > /proc/sys/kernel/printk'
- Enable CONFIG_SND_DEBUG + CONFIG_SND_PCM_XRUN_DEBUG + /proc/asound/card*/pcm*/xrun_debug

Troubleshooting attempts (unsuccessful):
- Increase Pipewire quantum settings
- Disable Pipewire and use ALSA directly, incl. with large 'buffer_size' in ALSA config
- Try all quirk flags in snd-usb-audio (the implicit FB flag ofc. helps)
- Try the Performance / Balanced / Power Save profile settings in Ubuntu

I believe some other Yamaha THR series devices may be affected as well, eg. the THR10: see https://linuxmusicians.com/viewtopic.php?p=164262
Comment 1 Jaakko Salo 2024-12-06 03:38:02 UTC
Created attachment 307325 [details]
alsa-info output with stock Ubuntu 24.04.1 kernel
Comment 2 Jaakko Salo 2024-12-06 03:39:28 UTC
Created attachment 307326 [details]
alsa-info output with Ubuntu 24.04.1 + linux-sound 6.12.0-rc7 + patch
Comment 3 Jaakko Salo 2024-12-06 03:42:34 UTC
Created attachment 307327 [details]
Patch to add implicit FB quirk for Yamaha THR5
Comment 4 Takashi Iwai 2024-12-06 08:31:22 UTC
The patch looks good.  Could you submit it to ML (linux-sound@vger.kernel.org) with Cc to me?  Then we'll review and merge to the upstream.  TIA!
Comment 5 Takashi Iwai 2024-12-07 13:06:05 UTC
The fix patch got merged to sound git tree, to be included in 6.13-rc3.
Comment 6 joseph klitzke 2025-02-22 01:42:12 UTC
Joseph Klitzke  2/21/2025

I found no change to the popping issue using
the snd_usb_audio.implicit_fb=1  I tested it on the THR30II and the THR10 
Tested it on a 5.10 kernel and a 6.9 kernel no difference. 

Is there a way to make changes to the code without recompiling the kernel?
IS making changes to the quirks.c file any diff than using snd_usb_audio.implicit_fb=1


I'm happy to work with however to test changes . I have the THR30II THR10
THR10C THR10X THR5A AMPS. Fixing one will probably fix all.

Note You need to log in before you can comment on or make changes to this bug.