alsa: only list IEC958 codecs when iec958 or hdmi device.

This commit is contained in:
Wim Taymans 2021-08-18 10:52:04 +02:00
parent 437275460c
commit 2e6f80f808

View file

@ -295,6 +295,8 @@ static inline uint32_t spa_alsa_get_iec958_codecs(struct state *state, uint32_t
{
uint64_t mask = state->iec958_codecs;
uint32_t i = 0, j = 0;
if (!(state->is_iec958 || state->is_hdmi))
return 0;
while (mask && i < max_codecs) {
if (mask & 1)
codecs[i++] = j;