usb sound card no detected in raspberry pi zero w - audio

I have raspberry pi zero W, running raspbian lite.
I'm trying to connect USB sound card.
the usb card is recognised by "dmesg" command but not added as sound card:
dmesg:
[ 67.941583] usb 1-1.1: new full-speed USB device number 7 using dwc_otg
[ 69.059664] usb 1-1.1: New USB device found, idVendor=0bda, idProduct=48f0,
bcdDevice= 0.03
[ 69.059715] usb 1-1.1: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[ 69.059743] usb 1-1.1: Product: USB Audio
[ 69.059765] usb 1-1.1: Manufacturer: Generic
[ 69.080726] input: Generic USB Audio as /devices/platform/soc/20980000.usb/usb1/1-
1/1-1.1/1-1.1:1.0/0003:0BDA:48F0.0006/input/input10
[ 69.142959] hid-generic 0003:0BDA:48F0.0006: input,hidraw0: USB HID v1.11 Device
[Generic USB Audio] on usb-20980000.usb-1.1/input0
lsusb:
Bus 001 Device 007: ID 0bda:48f0 Realtek Semiconductor Corp.
play -l: - no usb sound card
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
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

I was having the exact problem on RPi4. Once I blacklisted the built-in sound card, following these instructions: https://www.instructables.com/Disable-the-Built-in-Sound-Card-of-Raspberry-Pi/
the usb sound card was recognized and it worked.

Related

ubuntu 18.04 no sound

No sound on ubuntu 18.04 dell Inspiron 13. I'm not sure this pc require ALSA driver, maybe needs snd_soc_skl driver, Have someone try it? can you write how to change the kernel module in use in this Linux version?
Some details Inspiron-13-7368:~$ aplay -l
**** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC3253 Analog [ALC3253 Analog] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4] Subdevices: 1/1 Subdevice #0: subdevice #0
Inspiron-13-7368:~$ lspci -v
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21) (prog-if 80) Subsystem: Dell Sunrise Point-LP HD Audio Flags: bus master, fast devsel, latency 32, IRQ 152 Memory at d1128000 (64-bit, non-prefetchable) [size=16K] Memory at d1100000 (64-bit, non-prefetchable) [size=64K] Capabilities: Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel, snd_soc_skl
What I found was to remove the "timidity-deamon":
sudo apt purge timidity-daemon
Thanks to Aaro Alhainen for his post.
You can read about timidity-deamon package.

Nixos default audio device

I'm trying to configure the default audio device on a NixOS host.
My alsa devices are thus:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
I don't have HDMI or digitaul audio devices; I just want to use the regular ALC1220 Analog device.
I currently have AUDIODEV=hw:1,0 set in my environment (for sox), and alsa-audio-device=sysdefault:CARD=Generic in my vlcrc. That works, but it is obviously user- and app- specific, and is a pain for declaritiveness (declarity?).
It seems that it should be something I can set at the host level, e.g., by setting
sound.extraConfig =
''
pcm.!default {
type hw
card Generic
}
'';
in my configuration.nix, or possibly configuring pulseaudio.
I have sought help in the NixOS Wiki (ALSA, Pulse), on other sites such as ArchLinux, Pulse documentation, and other sites like StackOverflow (e.g., stackexchange), but I can find nothing that actually works.
I have tried the above, and variants thereof; and also tried with & without Pulse; but I have found nothing that works.
Simply being able to sound audio to all the devices on that card would be jolly good, too.
As always, any pointers gratefully recieved.
Update: here is my /etc/asound.conf
pcm_type.pulse {
libs.native = /nix/store/a3v4gh5lbb2g8fizq9xh8nbdp8qrvs6r-alsa-plugins-1.1.6/lib/alsa-lib/libasound_module_pcm_pulse.so ;
}
pcm.!default {
type pulse
hint.description "Default Audio Device (via PulseAudio)"
}
ctl_type.pulse {
libs.native = /nix/store/a3v4gh5lbb2g8fizq9xh8nbdp8qrvs6r-alsa-plugins-1.1.6/lib/alsa-lib/libasound_module_ctl_pulse.so ;
}
ctl.!default {
type pulse
}
(and that module is real):
$ ls -l /nix/store/a3v4gh5lbb2g8fizq9xh8nbdp8qrvs6r-alsa-plugins-1.1.6/lib/alsa-lib/libasound_module_ctl_pulse.so
-r-xr-xr-x 1 root root 33512 Jan 1 1970 /nix/store/a3v4gh5lbb2g8fizq9xh8nbdp8qrvs6r-alsa-plugins-1.1.6/lib/alsa-lib/libasound_module_ctl_pulse.so
This problem is most likely due to pulseaudio comandeering the default device, despite listing it in ~/.asoundrc.
The best solution to override pulse's comandeering of the default device with an alsa hook. To do this, edit your ~/.asoundrc with the following contents at the top :
#hooks [
{
func load
files [
"~/.asoundrc"
]
errors false
}
]
You can then add you default device as required, probably something like the following in your case :
pcm.!default {
type hw
card "Generic"
}
ctl.!default {
type hw
card "Generic"
}

How to fix: device_list:270: no soundcard found (Ubuntu server 18.04)?

I was trying to capture some audio using a usb microphone and I got the error message mentioned in the title.
here is the output some (hopefully relevant) commands:
arecord -l
arecord: device_list:270: no soundcards found...
ls /cat/asound*
ls: cannot access '/cat/asound*': No such file or directory
lspci -v
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
Subsystem: Hewlett-Packard Company 7 Series/C216 Chipset Family High Definition Audio Controller
Flags: bus master, fast devsel, latency 0, IRQ 29
Memory at f7c30000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
I've tried to remove and install alsa again and when I run
sudo arecord -l
The output is:
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC221 Analog [ALC221 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC221 Alt Analog [ALC221 Alt Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
I guess meaning Ubuntu is recognising my sound card. The ALSA Info script can be found here.
Any help would be greatly appreciated.
I had aplay: device_list:268: No sound card found... after using aplay l. Following the Ubuntu troubleshooting guide below, I installed apt install linux-generic and after reboot it found my soundcard from VirtualBox in Ubuntu Server 20.04 from ova.
https://help.ubuntu.com/community/SoundTroubleshooting

Errors using pyAudio

I'm trying to use the pyaudio examples provided on https://people.csail.mit.edu/hubert/pyaudio/#examples.
I have two Raspberry Pis, both of them have the pyAudio installed. One of them can run the examples wihtout any issues, however the other one spits the following error messages when trying to record audio for example:
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1438
Expression 'ValidateParameters( inputParameters, hostApi, StreamDirection_In )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2742
Traceback (most recent call last):
File "audioRecord.py", line 17, in <module>
frames_per_buffer=CHUNK)
File "/usr/local/lib/python3.2/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/local/lib/python3.2/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid number of channels] -9998
I have the following audio configs:
$ cat /proc/asound/modules
0 snd_usb_audio
1 snd_bcm2835
$ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 001 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 006: ID 046d:c077 Logitech, Inc.
Bus 001 Device 007: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
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 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
Could you please advise, what can be missing on this second device?
The solution was to make the sound device 0 as default.

Audio in Arch Linux

I have already some time a problem with audio in Arch Linux.
Here it goes:
When I plug my headphones in at boot Arch will play all audio through my headphones, when I plug them out there is just no sound. Arch will only play audio through my headphones.
When I do not plug them in at boot Arch will only play sound through my speakers.
Doeas anybody know how I can fix this so I don't have to reboot for changing my audio output device?
Thanks in advance and below some information about my Arch Linux on a Macbook Pro 7,1:
aplay -l:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: CS4206 Analog [CS4206 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: CS4206 Digital [CS4206 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
lspci:
00:00.0 Host bridge: NVIDIA Corporation MCP89 HOST Bridge (rev a1)
00:00.1 RAM memory: NVIDIA Corporation MCP89 Memory Controller (rev a1)
00:01.0 RAM memory: NVIDIA Corporation Device 0d6d (rev a1)
00:01.1 RAM memory: NVIDIA Corporation Device 0d6e (rev a1)
00:01.2 RAM memory: NVIDIA Corporation Device 0d6f (rev a1)
00:01.3 RAM memory: NVIDIA Corporation Device 0d70 (rev a1)
00:02.0 RAM memory: NVIDIA Corporation Device 0d71 (rev a1)
00:02.1 RAM memory: NVIDIA Corporation Device 0d72 (rev a1)
00:03.0 ISA bridge: NVIDIA Corporation MCP89 LPC Bridge (rev a2)
00:03.1 RAM memory: NVIDIA Corporation MCP89 Memory Controller (rev a1)
00:03.2 SMBus: NVIDIA Corporation MCP89 SMBus (rev a1)
00:03.3 RAM memory: NVIDIA Corporation MCP89 Memory Controller (rev a1)
00:03.4 Co-processor: NVIDIA Corporation MCP89 Co-Processor (rev a1)
00:04.0 USB controller: NVIDIA Corporation MCP89 OHCI USB 1.1 Controller (rev a1)
00:04.1 USB controller: NVIDIA Corporation MCP89 EHCI USB 2.0 Controller (rev a2)
00:06.0 USB controller: NVIDIA Corporation MCP89 OHCI USB 1.1 Controller (rev a1)
00:06.1 USB controller: NVIDIA Corporation MCP89 EHCI USB 2.0 Controller (rev a2)
00:08.0 Audio device: NVIDIA Corporation MCP89 High Definition Audio (rev a2)
00:0a.0 IDE interface: NVIDIA Corporation MCP89 SATA Controller (rev a2)
00:0b.0 RAM memory: NVIDIA Corporation Device 0d75 (rev a1)
00:0e.0 PCI bridge: NVIDIA Corporation Device 0d9a (rev a1)
00:15.0 PCI bridge: NVIDIA Corporation Device 0d9b (rev a1)
00:16.0 PCI bridge: NVIDIA Corporation Device 0d9b (rev a1)
00:17.0 PCI bridge: NVIDIA Corporation MCP89 PCI Express Bridge (rev a1)
01:00.0 FireWire (IEEE 1394): LSI Corporation FW643 [TrueFire] PCIe 1394b Controller (rev 08)
02:00.0 Network controller: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5764M Gigabit Ethernet PCIe (rev 10)
04:00.0 VGA compatible controller: NVIDIA Corporation Device 08a0 (rev a2)
cat /etc/modprobe.d/alsa-base.conf :
options snd-hda-intel model=mbp55
options snd slots=snd-hda-intel
# RE4e._ECyo4j5hZB:nVidia Corporation
alias snd-card-0 snd-hda-intel
EDIT:
I forgot to say: I have Xfce4 as a desktop environment.
First of all, check if you have a sound system installed. Open your favorite terminal and type :
$ pacman -Qs | grep "alsa"
It should be the default installed.
If the commmand output is blank, it means that you have no sound system. You can then install the one you want.
Pulseaudio :
# pacman -Syu && pacman -S pulseaudio pavucontrol
use
$ pavucontrol
To change all the audio ouput and input. You can even redirect ouput stream into a microphone and some other cool stuff based on the principle of client/server.
Alsa :
# pacman -Syu && pacman -S alsa-utils alsa-plugins
Alsa is very simple (but lack some features) and is really easy to use. Its modules are directly included in the kernel which means it can perform out of the box on about every sound hardware. You can changes audio ouput by issuing the following command :
$ alsamixer
Which will prompt a nice terminal-based interface. From there, I'll suggest you to boost all the flux to 100% (to the very top of each one).
The xfce4 sound applet should work just fine. If not, you can download a simple volume control :
# pacman -Syu && pacman -S volumeicon
You may will have to do some changes to your Xstartup file to add the volumeicon applet.
Let me know if you run into any troubles.
I dont know what kind of Desktop environments which you use. But you can do that:
Try not to plug your headphones when boot
if you use gnome, you can open Setting-> Sound-> Output -> Choose a device for sound output, then choose the right device.
Have you installed the correct xfce-mixer (32 or 64 bit?)
Check this one you may have to manually compile the gstreamer0.10-good-plugins
I have always had trouble with sound in Arch Linux...
If you would be willing to try an alternative, there is Antergos (http://antergos.com/). It is a varient of Arch which comes with a desktop environment of your choice installed and I have never had trouble with the sound.
Besides that, it still provides the same benefits as normal Arch.

Resources