You are not logged in.

#1 2024-10-26 17:51:29

Muzzy
Member
Registered: 2022-09-24
Posts: 12

Issue with Pipewire and Digital Piano

I've been using pulseaudio for a long time, very recently I had a desire arise to switch to pipewire.
I then went to the arch wiki page for pipewire and i followed the instructions on it, installing the corresponding packages for alsa pulse and jack, as well as pipewire-audio and wireplumber.
I did not do anything to the default configuration, in fact everything seemed to work just great.
Couple days later now, I noticed for the first time an issue, namely my Yamaha P-145 digital piano which has an audio and midi output cable connected to USB to my computer, only is recognized as a midi device and not an audio device.
Now this is different from what I expected because I used to record audio from it while I was using pulse, much like you would from a microphone.
Another curiosity is that in qpwgraph the MIDI inputs and outputs that do appear are marked P-125 which isn't the model of the piano. Although i never used this program before so its possible that under the hood they have the same MIDI controller or something.
It might be also worth noting that I haven't actually tried something like a microphone to see if it works ok.

Here's what i tried to do to get an insight into this issue:
I noticed that the output of either of the following commands doesn't depend on if the piano is turned on

pactl show short sources
32      audiorelay-virtual-mic-sink     PipeWire        float32le 2ch 48000Hz   SUSPENDED
40      audiorelay_Speaker.monitor      PipeWire        float32le 2ch 48000Hz   IDLE
59      alsa_output.pci-0000_00_1b.0.analog-stereo.monitor      PipeWire        s32le 2ch 48000Hz       RUNNING
60      alsa_input.pci-0000_00_1b.0.iec958-stereo       PipeWire        s32le 2ch 48000Hz       SUSPENDED

arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 2: ALC887-VD Alt Analog [ALC887-VD Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I also tried creating a configuration file in wireplumber as described in the Pipewire wiki page section 5.1.1 which didn't seem to do anything for me.
Following this I started to feel a little bit out of my depth in this subject and i would really appreciate some help.
journalctl -k is here https://pastebin.com/Ma7Lets1

Offline

#2 2024-10-26 20:20:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,203

Re: Issue with Pipewire and Digital Piano

Oct 26 19:19:56 desktop kernel: usb 3-7: Quirk or no altset; falling back to MIDI 1.0
Oct 26 19:19:56 desktop kernel: snd-usb-audio 3-7:1.0: probe with driver snd-usb-audio failed with error -2
Oct 26 19:19:56 desktop kernel: usb 3-7: Quirk or no altset; falling back to MIDI 1.0
Oct 26 19:19:56 desktop kernel: snd-usb-audio 3-7:1.1: probe with driver snd-usb-audio failed with error -2
Oct 26 19:19:56 desktop kernel: usb 3-7: Quirk or no altset; falling back to MIDI 1.0
Oct 26 19:19:56 desktop kernel: snd-usb-audio 3-7:1.2: probe with driver snd-usb-audio failed with error -2
Oct 26 19:19:56 desktop kernel: usb 3-7: Quirk or no altset; falling back to MIDI 1.0
Oct 26 19:20:10 desktop kernel: usb 3-7: USB disconnect, device number 6
Oct 26 19:40:20 desktop kernel: usb 3-7: new full-speed USB device number 7 using xhci_hcd
Oct 26 19:40:20 desktop kernel: usb 3-7: New USB device found, idVendor=0499, idProduct=1718, bcdDevice= 1.00
Oct 26 19:40:20 desktop kernel: usb 3-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Oct 26 19:40:20 desktop kernel: usb 3-7: Product: Digital Piano
Oct 26 19:40:20 desktop kernel: usb 3-7: Manufacturer: Yamaha Corporation
Oct 26 19:40:20 desktop kernel: usb 3-7: Quirk or no altset; falling back to MIDI 1.0
Oct 26 19:40:20 desktop kernel: snd-usb-audio 3-7:1.0: probe with driver snd-usb-audio failed with error -2
Oct 26 19:40:20 desktop kernel: usb 3-7: Quirk or no altset; falling back to MIDI 1.0
Oct 26 19:40:20 desktop kernel: snd-usb-audio 3-7:1.1: probe with driver snd-usb-audio failed with error -2
Oct 26 19:40:20 desktop kernel: usb 3-7: Quirk or no altset; falling back to MIDI 1.0
Oct 26 19:40:20 desktop kernel: snd-usb-audio 3-7:1.2: probe with driver snd-usb-audio failed with error -2
Oct 26 19:40:20 desktop kernel: usb 3-7: Quirk or no altset; falling back to MIDI 1.0

It's basically failing to load the "normal" audio interface which would give you an ALSA node/normal recording device. This could be due to how wireplumber queries device. Does the issue disappear on pulseaudio? Do you even want to use the midi interface? This could be a kernel issue first and foremost, so maybe check with the last kernel you remember working/LTS or so.

For more surrounding context what does a plain sudo journalctl -b give you?

Offline

#3 2024-10-26 21:35:58

Muzzy
Member
Registered: 2022-09-24
Posts: 12

Re: Issue with Pipewire and Digital Piano

Hey, thanks for helping.
I quickly installed pulse again and I noticed that in fact the same issue persists which I just didn't happen to notice while I was on it.
After this I tried the LTS kernel which didn't help me, so I eventually downgraded to 6.7.9 kind of at random after trying a few more recent kernels and I noticed that the issue is resolved there.
Interestingly the device was denoted just as Digital Piano in the patchbay.
Yes I very much want to use both the audio interface and the midi interface.

journalctl -b https://pastebin.com/L76qyerM

I'm hoping there's something else i could do that is more convenient than running an older kernel.

Offline

#4 2024-10-27 21:09:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,203

Re: Issue with Pipewire and Digital Piano

You'll want to find the most current kernel that still works as well as the most current kernel that breaks and then you'll need to bisect to find the culprit...

This and the few commits that follow it read fishy and have only landed in 6.11 kernels: https://github.com/torvalds/linux/commi … 8e64abR276 FWIW the entire device that is both midi and a normal audio device code reads like it's currently quite in flux, might also want to test e.g. linux-mainline on whether you can still repro the issue on a 6.12 RC

Last edited by V1del (2024-10-27 21:25:46)

Offline

#5 2024-11-11 04:02:52

manhi40
Member
Registered: 2014-12-13
Posts: 5

Re: Issue with Pipewire and Digital Piano

I have the same issue with a P-125 running on kernel 6.11.6.arch1-1. I found the issue and it's the commit that V1del mentioned.
After reverting the commit the piano's audio devices enumerate.
The issue is that the YAMAHA_DEVICE macro will take any device and make try to make it a MIDI device, but the P-125 has 4 audio devices under one USB device, and two of them are regular audio devices, not MIDI devices.
Here's the macro:

#define YAMAHA_DEVICE(id, name) { \
	USB_DEVICE(0x0499, id), \
	QUIRK_DRIVER_INFO { \
		.vendor_name = "Yamaha", \
		.product_name = name, \
		QUIRK_DATA_MIDI_YAMAHA(QUIRK_ANY_INTERFACE) \
	} \
}

I'll attempt to patch this if I have time but if not I'll at least contact the guy that made this patch.

Offline

#6 2024-11-11 13:57:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,203

Re: Issue with Pipewire and Digital Piano

Ah nice, always a bit weird to have to guess based on random hunches with no way to repro yourself. tongue

Offline

#7 2024-11-12 18:21:31

manhi40
Member
Registered: 2014-12-13
Posts: 5

Re: Issue with Pipewire and Digital Piano

FYI, I created a patch and it has been accepted by Takashi Iwai

https://lore.kernel.org/linux-sound/87f … se.de/T/#t

Offline

Board footer

Powered by FluxBB