mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-22 10:50:15 -10:00
Both ALSA drivers now take the device's channel order from its channel map - snd_pcm_get_chmap() for alsa-lib, the card's "Playback Channel Map" control for tinyalsa - and fall back to ALSA's own FL FR RL RR FC LFE SL SR order where there is none. The frontend's frames are permuted into it on the way out, in a stage for write() and in place in a lent mmap span, so an HDA card no longer plays the centre from the rear left; a device already in the frontend's order costs nothing. A 7.1 request on a narrower card now opens 6 or 4 channels before stereo in both drivers, and tinyalsa reports the layout it opened rather than stereo. alsa_write() advances by the frame size after a short write instead of assuming two channels.