notaturkey / ohsillyscope

making this project open source for the peeps
GNU General Public License v3.0
66 stars 0 forks source link

cannot open audio device hw:0 #2

Open weigu1 opened 1 year ago

weigu1 commented 1 year ago

Hi,

To compile I had to install libasound2-dev and libncurses-dev.

My matrix is working with the standard examples. I have a HifiBerry hat (card0) that is working with mpd (Raspi4 newest OS). When I try to start with sudo ./osc "hw:0" I get the following errors. After this my playback is not working anymore

Failed to create secure directory (/root/.config/pulse): Permission denied
Failed to load cookie file from cookie: Permission denied
ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card
cannot open audio device hw:0 (No such file or directory)

Thanks for your help.

notaturkey commented 1 year ago

whats the output from aplay -l?

that card could have a different naming convention that Alsa uses

weigu1 commented 1 year ago

Here is the output:

**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 [HiFiBerry DAC+ HiFi pcm512x-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
notaturkey commented 1 year ago

its using ALSA library, this has a description here of what the naming convention is for ALSA. Maybe try hw:0,0?