diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 180650e2e..d2a2c8ee2 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -402,7 +402,7 @@ int spa_alsa_init(struct state *state, const struct spa_dict *info) } if (state->clock_name[0] == '\0') snprintf(state->clock_name, sizeof(state->clock_name), - "api.alsa.%d", state->card_index); + "api.alsa.%u", state->card_index); if (state->stream == SND_PCM_STREAM_PLAYBACK) { state->is_iec958 = spa_strstartswith(state->props.device, "iec958"); @@ -412,7 +412,7 @@ int spa_alsa_init(struct state *state, const struct spa_dict *info) state->card = ensure_card(state->card_index, state->open_ucm); if (state->card == NULL) { - spa_log_error(state->log, "can't create card %d", state->card_index); + spa_log_error(state->log, "can't create card %u", state->card_index); return -errno; } return 0; diff --git a/spa/plugins/alsa/alsa-pcm.h b/spa/plugins/alsa/alsa-pcm.h index 7c30c8f33..32a9e2001 100644 --- a/spa/plugins/alsa/alsa-pcm.h +++ b/spa/plugins/alsa/alsa-pcm.h @@ -109,7 +109,7 @@ struct state { struct spa_system *data_system; struct spa_loop *data_loop; - int card_index; + uint32_t card_index; struct card *card; snd_pcm_stream_t stream; snd_output_t *output;