waveshare / WM8960-Audio-HAT

The drivers of [WM8960 Audio HAT] for Raspberry Pi
GNU General Public License v3.0
100 stars 65 forks source link

How do I make it the default device? #19

Open Galbi3000 opened 3 years ago

Galbi3000 commented 3 years ago

Hi, I have been working on getting this device working on my Raspberry Pi 4 using the latest Raspbian OS 32-bit. After some issues I have got aplay working and mpg123 but I have to specify the device (HW:1,0) every time. I followed the guide provided in PDF form and got to the section on making it the default device. I edited the specified config file and made the changes suggested in the instructions. I get silence unless I specify the device. If left with the original settings I get audio out of the Raspberry Pi headphone socket so the players are working when you do not specify the device and are picking up the default device when it's set to the Pi but not when it's set to the WM8960. Any ideas how to get it working as the default device?

These are the changes in alsa.conf I have tried...

First the suggested changes from the instructions: defaults.ctl.card 1 defaults.pcm.card 1 These just produce silence.

When all are set to 0 the sound outputs through the Pi's headphone socket fine.

aplay -l produces the following output: List of PLAYBACK Hardware Devices card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] 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: wm8960soundcard [wm8960-soundcard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0

codingjoe commented 3 years ago

Hi @Galbi3000,

The RaspberryPi's config script is your friend here.

sudo raspi-config

1 System Options > S2 Audo > 1 wm8960-hifi-0

Best, Joe