TinyAlsa: audio device identification
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
TinyAlsa fails to identify the right audio card/device (always pcmC0D0p that does not exist ). No sound
Expected behavior
TinyAlsa picks up an existing device amongst:
ls -lha /dev/snd/pcm*
crw-rw----+ 1 root audio 116, 6 Jan 28 09:59 /dev/snd/pcmC0D10p
crw-rw----+ 1 root audio 116, 2 Jan 28 09:59 /dev/snd/pcmC0D3p
crw-rw----+ 1 root audio 116, 3 Jan 28 09:59 /dev/snd/pcmC0D7p
crw-rw----+ 1 root audio 116, 4 Jan 28 09:59 /dev/snd/pcmC0D8p
crw-rw----+ 1 root audio 116, 5 Jan 28 09:59 /dev/snd/pcmC0D9p
crw-rw----+ 1 root audio 116, 10 Jan 28 09:59 /dev/snd/pcmC1D0c
crw-rw----+ 1 root audio 116, 9 Jan 28 18:30 /dev/snd/pcmC1D0p
crw-rw----+ 1 root audio 116, 11 Jan 28 09:57 /dev/snd/pcmC1D2c
Actual behavior
Compilation is okay:
grep -i audio log
Checking presence of predefined macro AUDIO_SETINFO in sys/audioio.h ... no
Checking existence of -lossaudio ... no
CC libretro-common/audio/resampler/audio_resampler.c
CC libretro-common/audio/dsp_filter.c
CC libretro-common/audio/resampler/drivers/sinc_resampler.c
CC libretro-common/audio/resampler/drivers/nearest_resampler.c
CC tasks/task_audio_mixer.c
CC libretro-common/audio/audio_mix.c
CC libretro-common/audio/audio_mixer.c
CC audio/drivers_resampler/cc_resampler.c
CC audio/drivers/oss.c
CC audio/drivers/tinyalsa.c
CC libretro-common/audio/conversion/s16_to_float.c
CC libretro-common/audio/conversion/float_to_s16.c
CC audio/audio_thread_wrapper.c
During runtime:
[ERROR] [TINYALSA]: params: Cannot open audio device.
[ERROR] [TINYALSA]: Failed to initialize tinyalsa driver.
cannot open device '/dev/snd/pcmC0D0p'
Steps to reproduce the bug
- ./configure
- make
- ./retroarch
Bisect Results
N/A. I compiled from commits involving changes in audio/drivers/tinyalsa.c. Tinyalsa always selects pcmC0D0p
Version/Commit
- RetroArch: d0a2315098
Environment information
- OS: Ubuntu 18.04.3 LTS
- Compiler: gcc 7.4.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with audio/drivers/tinyalsa.c and reproduce the reported device-selection failure using ./configure, make, and ./retroarch. Compare the device path it selects with the available /dev/snd/pcm* entries and the runtime error. Done means TinyAlsa selects an existing audio device and initializes without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100