Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2124113 - After upgrade pipewire.x86_64 0.3.56-2.fc37 to 0.3.57-1.fc38 some USB audio device play sound with wrong samplerate
Summary: After upgrade pipewire.x86_64 0.3.56-2.fc37 to 0.3.57-1.fc38 some USB audio d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pipewire
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Wim Taymans
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-04 20:00 UTC by Mikhail
Modified: 2022-09-18 00:18 UTC (History)
3 users (show)

Fixed In Version: pipewire-0.3.58-1.fc36 pipewire-0.3.58-1.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-16 09:29:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Audio sample (deleted)
2022-09-04 20:00 UTC, Mikhail
no flags Details
pw-dump.log (deleted)
2022-09-04 20:01 UTC, Mikhail
no flags Details
pw-top (deleted)
2022-09-04 20:11 UTC, Mikhail
no flags Details
build.log (deleted)
2022-09-08 18:59 UTC, Mikhail
no flags Details

Description Mikhail 2022-09-04 20:00:54 UTC
Created attachment 1909540 [details]
Audio sample

Created attachment 1909540 [details]
Audio sample

Description of problem:
After upgrade pipewire.x86_64 0.3.56-2.fc37 to 0.3.57-1.fc38 some USB audio device play sound with wrong samplerate.
If reconnect the sound device, then the problem disappears. For reproduce again needs pause the sound from all applications. Select HDMI output and do sound check in GNOME, then switch back to preferred USB device. (In my case it is IL-DSP)

Version-Release number of selected component (if applicable):
0.3.57

How reproducible:
Most simple way use internal in GNOME sound check.

Workaround:
$ koji download-build  pipewire-0.3.56-2.fc37 --arch=x86_64  --arch=noarch --arch=i686
# dnf downgrade pipewire.* --refresh

Comment 1 Mikhail 2022-09-04 20:01:26 UTC
Created attachment 1909541 [details]
pw-dump.log

Comment 2 Mikhail 2022-09-04 20:11:30 UTC
Created attachment 1909543 [details]
pw-top

Comment 3 Wim Taymans 2022-09-05 09:17:24 UTC
I can't reproduce this.

Comment 4 Wim Taymans 2022-09-05 09:47:47 UTC
Maybe related to https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2620 ?

Comment 5 Mikhail 2022-09-06 21:36:22 UTC
(In reply to Wim Taymans from comment #3)
> I can't reproduce this.

This video demonstrate how reproduce the issue and how return sound interface to normal state https://youtu.be/uwEvTEEoHGs

TD;DR:
1) For reproduce the issue is enough make sound check on HDMI interface and then return to problematic USB interface (in my case it IL-DSP).
2) For return sound interface to normal state is enough switch to another USB interface which is not affected (in my case it is SSL 2+) start playing music and without stop return to problematic USB interface.

(In reply to Wim Taymans from comment #4)
> Maybe related to
> https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2620 ?

Two questions:
1) Why with pipewire 0.3.56-2.fc37 I didn't hit this issue with fresh kernel?
2) Why this issue happens only when I do sound check HDMI interface?

Comment 6 Mikhail 2022-09-06 23:04:25 UTC
I can bisect the issue but I have a build problem

[480/762] g++  -o spa/plugins/libcamera/libspa-libcamera.so spa/plugins/libcamera/libspa-libcamera.so.p/libcamera.c.o spa/plugins/libcamera/libspa-libcamera.so.p/libcamera-manager.cpp.o spa/plugins/libcamera/libspa-libcamera.so.p/libcamera-device.cpp.o spa/plugins/libcamera/libspa-libcamera.so.p/libcamera-source.cpp.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libspa-libcamera.so -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection /usr/lib64/libudev.so /usr/lib64/libcamera.so /usr/lib64/libcamera-base.so -pthread /usr/lib64/libdrm.so -Wl,--end-group
../spa/plugins/libcamera/libcamera-manager.cpp:69:16: warning: type ‘struct impl’ violates the C++ One Definition Rule [-Wodr]
   69 | typedef struct impl {
      |                ^
../spa/plugins/libcamera/libcamera-device.cpp:67:8: note: a different type is defined in another translation unit
   67 | struct impl {
      |        ^
../spa/plugins/libcamera/libcamera-manager.cpp:74:26: note: the first difference of corresponding definitions is field ‘main_loop’
   74 |         struct spa_loop *main_loop;
      |                          ^
../spa/plugins/libcamera/libcamera-device.cpp:73:22: note: a field with different name is defined in another translation unit
   73 |         struct props props;
      |                      ^
ninja: build stopped: subcommand failed.
error: Bad exit status from /var/tmp/rpm-tmp.LEKGM2 (%build)
    Bad exit status from /var/tmp/rpm-tmp.LEKGM2 (%build)

RPM build errors:
Finish: rpmbuild pipewire-0.3.57-1.2022090702git3f3b70a.fc38.src.rpm
Finish: build phase for pipewire-0.3.57-1.2022090702git3f3b70a.fc38.src.rpm
ERROR: Exception(/home/mikhail/rpmbuild/SRPMS/pipewire-0.3.57-1.2022090702git3f3b70a.fc38.src.rpm) Config(fedora-rawhide-x86_64) 1 minutes 48 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M f049bb94f2cd48baac4c2bd765b7b354 -D /var/lib/mock/fedora-rawhide-x86_64/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.oo8h9dbn:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c /usr/bin/rpmbuild -bb --noclean --target x86_64 --nodeps /builddir/build/SPECS/pipewire.spec

Comment 7 Mikhail 2022-09-08 18:59:12 UTC
Created attachment 1910535 [details]
build.log

1)
../spa/plugins/libcamera/libcamera-device.cpp:85:40: error: cannot convert ‘const libcamera::Control<std::__cxx11::basic_string<char> >’ to ‘unsigned int’

2)
../spa/plugins/libcamera/libcamera-device.cpp:86:51: error: no match for ‘operator=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘std::optional<std::__cxx11::basic_string<char> >’)
   86 |                 name = props.get(properties::Model);
3)
/usr/include/c++/12/type_traits:2614:11: error: no type named ‘type’ in ‘struct std::enable_if<false, std::__cxx11::basic_string<char>&>’

4)
../spa/plugins/libcamera/libcamera-device.cpp:96:40: error: cannot convert ‘const libcamera::Control<int>’ to ‘unsigned int’

5)
../spa/plugins/libcamera/libcamera-device.cpp:97:34: error: switch quantity not an integer

Comment 8 Wim Taymans 2022-09-15 15:10:16 UTC
Maybe try: https://bodhi.fedoraproject.org/updates/FEDORA-2022-df4412a6d3
rawhide should also have an update now.

Comment 9 Mikhail 2022-09-16 06:33:50 UTC
(In reply to Wim Taymans from comment #8)
> Maybe try: https://bodhi.fedoraproject.org/updates/FEDORA-2022-df4412a6d3
> rawhide should also have an update now.

Yes, pipewire-0.3.58-1.fc38 fixed this issue.
What was the problem?

Comment 10 Wim Taymans 2022-09-16 09:29:38 UTC
> What was the problem?

I don't know exactly. I think this https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/7b432aec88bd84e848a9a2712f579527d2907624 commit makes it
less likely that it needs to switch rates and end up hitting driver bugs like the one in https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2620

Comment 11 Fedora Update System 2022-09-16 09:30:25 UTC
FEDORA-2022-df4412a6d3 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-df4412a6d3

Comment 12 Fedora Update System 2022-09-16 09:30:52 UTC
FEDORA-2022-3f7822531c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-3f7822531c

Comment 13 Fedora Update System 2022-09-17 01:40:00 UTC
FEDORA-2022-3f7822531c has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2022-09-18 00:18:26 UTC
FEDORA-2022-df4412a6d3 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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