ovenwerks / studio-controls

A helper for setting up a system for audio work
GNU General Public License v2.0
73 stars 10 forks source link

Getting alsaaudio.ALSAAudioError: Broken pipe after using a USB soundcard input for a while #50

Closed dbogdanov closed 3 years ago

dbogdanov commented 3 years ago

I am using Zoom H4n as an audio interface. Initially it works well with studio-controls and Carla, however, after some time, the interface disappears from Carla.

Restarting jack in studio-control does not help, the ~/.log/autojack.log log contains an error:

2021-03-04 03:28:50,321 - root - INFO - Got start signal.
2021-03-04 03:28:50,322 - root - INFO - Running: config_start()
2021-03-04 03:28:54,570 - root - WARNING - Jack Message: Server is not running
2021-03-04 03:28:54,571 - root - WARNING - Jack Message: Server is not running
2021-03-04 03:28:55,726 - dbus.connection - ERROR - Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 232, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/bin/autojack", line 1105, in ses_cb_start
    config_start()
  File "/usr/bin/autojack", line 565, in config_start
    start_slave(subname)
  File "/usr/bin/autojack", line 979, in start_slave
    dsr = get_card_rate(ldev)
  File "/usr/bin/autojack", line 916, in get_card_rate
    adev_h = alsaaudio.PCM(type=dtype, device=f"hw:{rtdev}")
alsaaudio.ALSAAudioError: Broken pipe [hw:H4,0,0]
$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC233 Analog [ALC233 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: U0x46d0x825 [USB Device 0x46d:0x825], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: H4 [H4], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0```
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 046d:c542 Logitech, Inc. Wireless Receiver
Bus 001 Device 003: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 001 Device 007: ID 1686:0045 ZOOM Corporation Handy Recorder stereo mix
Bus 001 Device 006: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 005: ID 8087:0aaa Intel Corp. Bluetooth 9460/9560 Jefferson Peak (JfP)
Bus 001 Device 002: ID 046d:c545 Logitech, Inc. USB Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
ovenwerks commented 3 years ago

The error message indicates that the link between the device and ALSA was broken. Normally, Jackd on restart will do a reset for that device. However, if this device would not normally show up as system:* then it may not get a reset. To check if this is recoverable, stop jack (which should restart pulse) and see if desktop audio can use this device via pulse. If not, the device, USB cable, USB chip or some other hardware has dropped something. That should mean that either replugging the device in or repowering the device may bring it back. If not, try repowering the computer. Certainly these things are not the fix for the problem, but knowing what action fixes the problem may point to the problem.

ovenwerks commented 3 years ago

No activity for more than 3 months