Closed allebb closed 7 years ago
This is another example of the issue: https://stackoverflow.com/questions/33108558/audio-capturing-using-alsa-library-snd-pcm-open-no-such-file-or-directory
Examples of how to set the default driver: https://unix.stackexchange.com/questions/93128/alsa-how-can-i-tell-my-default-audio-output-is-card-2-and-device-0-not-hdmi
This is how openrepeater detected sound cards: https://github.com/OpenRepeater/openrepeater/blob/1.1.0/includes/get_sound.php
More information, specific to the Raspberry can be found here: https://sourceforge.net/p/sox/mailman/message/34114137/
This seems rather useful as it describes how to output the sound devices etc.
Apparently this should work:
sudo modprobe snd-pcm-oss
Also another interesting read so that the sound card order is re-prioritised which may fix the issue (as the Pi doesn't have a mic by default).
https://www.raspberrypi.org/forums/viewtopic.php?t=17950&p=347802
Could also try configuring as: hw:1,0
which apparently is what a USB headset/audio card uses when it's plugged into the RPi.
Another great example, can be found here:
This worked for me on Raspbian Jessie.
If you don't need the onboard audio chip (i.e. analog output or hdmi audio), disable it and then the USB audio device can become the primary device:
Disable onboard audio.
Open /etc/modprobe.d/raspi-blacklist.conf and add blacklist snd_bcm2835.
Allow the USB audio device to be the default device.
Open /lib/modprobe.d/aliases.conf and comment out the line options snd-usb-audio index=-2
Reboot
sudo reboot
Test it out.
$ aplay /usr/share/sounds/alsa/Front_Center.wav
Taken from: https://superuser.com/questions/989385/how-to-make-raspberry-pi-use-an-external-usb-sound-card-as-a-default
This is now fully working again now, the "fix" was to disable the onboard audio with the above comment, the details on how to achieve this can be found documented in the README.md file now.
The problem is described here: http://sox.10957.n7.nabble.com/Changing-the-audio-input-card-td1645.html