diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index af11848a7..6ecf4a0b6 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -973,13 +973,6 @@ int spa_alsa_init(struct state *state, const struct spa_dict *info) if (info && (str = spa_dict_lookup(info, "device.profile.pro")) != NULL) state->is_pro = spa_atob(str); - if (info && spa_strstartswith(spa_dict_lookup(info, SPA_KEY_API_ALSA_CARD_NAME), "sof-") && - state->stream == SND_PCM_STREAM_PLAYBACK) { - state->use_period_size_min_as_headroom = true; - spa_log_info(state->log, - "ALSA SOF driver detected: default api.alsa.use-period-size-min-as-headroom=true"); - } - state->multi_rate = true; state->htimestamp = false; state->htimestamp_max_errors = MAX_HTIMESTAMP_ERROR; @@ -1045,6 +1038,19 @@ int spa_alsa_init(struct state *state, const struct spa_dict *info) state->iec958_codecs |= 1ULL << SPA_AUDIO_IEC958_CODEC_PCM; } + if (info && spa_strstartswith(spa_dict_lookup(info, SPA_KEY_API_ALSA_CARD_NAME), "sof-") && + state->stream == SND_PCM_STREAM_PLAYBACK) { + state->use_period_size_min_as_headroom = true; + spa_log_info(state->log, + "ALSA SOF driver detected: default api.alsa.use-period-size-min-as-headroom=true"); + + if (info && spa_strstartswith(spa_dict_lookup(info, "alsa.id"), "HDMI")) { + state->props.use_chmap = false; + spa_log_info(state->log, "Disable use-chmap by default for SOF %s", + spa_dict_lookup(info, "alsa.id")); + } + } + state->card = ensure_card(state->card_index, state->open_ucm, state->is_split_parent); state->log_file = fopencookie(state, "w", io_funcs);