spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
980 stars 145 forks source link

sounddevice not recognize all devices? #522

Closed Xavelyn closed 4 months ago

Xavelyn commented 4 months ago

Hello,

I have a problem, unfortunately not all devices are displayed (via python3 -m sounddevice or sd.query_devices()) that are recognised via arecord -l or aplay -l.

I have already found the following threads, but unfortunately nothing has helped (https://github.com/spatialaudio/python-sounddevice/issues/71, https://github.com/spatialaudio/python-sounddevice/issues/325)

Some more information:

sounddevice version 0.4.6

sounddevice.get_portaudio_version() Output: (1246720, 'PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4')

python3 -m sounddevice Output:

0 vc4-hdmi-1: MAI PCM i2s-hifi-0 (hw:1,0), ALSA (0 in, 2 out)
1 Loopback: PCM (hw:2,0), ALSA (32 in, 2 out)
2 Loopback: PCM (hw:2,1), ALSA (32 in, 32 out)
3 USB Sound Blaster HD: Audio #1 (hw:3,1), ALSA (2 in, 2 out)
4 USB Sound Blaster HD: Audio #2 (hw:3,2), ALSA (0 in, 2 out)
5 pulse, ALSA (32 in, 32 out)
* 6 default, ALSA (32 in, 32 out)

aplay -l Output:

**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 3: HD [USB Sound Blaster HD], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 3: HD [USB Sound Blaster HD], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: HD [USB Sound Blaster HD], device 2: USB Audio [USB Audio #2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

cat /etc/*-release Output:

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

What is missing is hw:3,0 and hw:0,0, whereby hw:3,1 and hw:3,2 are recognised. Thank you in advance