alsa-project / alsa-plugins

The Advanced Linux Sound Architecture (ALSA) - plugins
GNU Lesser General Public License v2.1
41 stars 28 forks source link

Warnings on startup #20

Closed bramtayl closed 3 years ago

bramtayl commented 3 years ago

I've been trying to get Julia's PortAudio to load alsa-plugins (it's been a process). I thought I might as well see if I can cut down on the warnings on start up (using PortAudio from Julia) and some of them I've been able to knock out but some of them not so much:

These ones

ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side

I got rid of by commenting out lines in my alsa.conf file:

# pcm.rear cards.pcm.rear
# pcm.center_lfe cards.pcm.center_lfe
# pcm.side cards.pcm.side

This one

ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map

I got rid of by commening out:

# pcm.surround21 cards.pcm.surround21
# pcm.surround40 cards.pcm.surround40
# pcm.surround41 cards.pcm.surround41
# pcm.surround50 cards.pcm.surround50
# pcm.surround51 cards.pcm.surround51
# pcm.surround71 cards.pcm.surround71

I'm not sure if these work arounds are the best solutions...shouldn't alsa be able to tell that my laptop doesn't have surround sound?

This one is expected, I haven't yet figured out how to build jack on Julia's BinaryBuilder:

ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_jack.so (/home/brandon/.julia/artifacts/d587f48a6815c72dec4b083bf297caec7a8e3f4b/lib/alsa-lib/libasound_module_pcm_jack.so: cannot open shared object file: No such file or directory)

These ones are a bit confusing;

ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card

Is it possible that oss/50-oss.conf and usb_stream/98-usb-stream.conf need to get updated?

bramtayl commented 3 years ago

Well, the oss.conf seems to be able to be fixed by replacing "port" with device. But it turns out I don't think I have oss in the first place, so I'm just going to delete the conf file for it. For the usb stream conf file, I think you're missing an @ on the function for the default card name. Also, defaults.pcm.card seems to be an int for me (0), but card seems to expect a string...so many a different default is needed?

bramtayl commented 3 years ago

I can fix the usb stream conf by setting the default to the actual name of a sound card and deleting the hints:

default "PCH [HDA Intel PCH]"

So presumably, card is expecting a name, not an index

bramtayl commented 3 years ago

So in summary:

I don't mean to be rude, but is anyone maintaining this? Should these things be caught by tests?

perexg commented 3 years ago

The surround devices may not be available and there's no fix for this (the HDA config is too generic). It's just easy to ignore these errors. If we move completely to UCM, we can create a better device scheme.

Thank you for your report.

bramtayl commented 3 years ago

Sweet, thanks for the fix!