mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 19:34:14 +00:00
ao_alsa: print more chmap info at debug verbosity
This commit is contained in:
parent
5a18c5ea91
commit
0ca8b290a4
@ -318,20 +318,22 @@ static bool query_chmaps(struct ao *ao, struct mp_chmap *chmap)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (int i = 0; maps[i] != NULL; i++) {
|
for (int i = 0; maps[i] != NULL; i++) {
|
||||||
|
char aname[128];
|
||||||
|
if (snd_pcm_chmap_print(&maps[i]->map, sizeof(aname), aname) <= 0)
|
||||||
|
aname[0] = '\0';
|
||||||
|
|
||||||
struct mp_chmap entry;
|
struct mp_chmap entry;
|
||||||
mp_chmap_from_alsa(&entry, &maps[i]->map);
|
mp_chmap_from_alsa(&entry, &maps[i]->map);
|
||||||
|
|
||||||
if (mp_chmap_is_valid(&entry)) {
|
if (mp_chmap_is_valid(&entry)) {
|
||||||
|
struct mp_chmap reorder = entry;
|
||||||
if (maps[i]->type == SND_CHMAP_TYPE_VAR)
|
if (maps[i]->type == SND_CHMAP_TYPE_VAR)
|
||||||
mp_chmap_reorder_norm(&entry);
|
mp_chmap_reorder_norm(&reorder);
|
||||||
MP_DBG(ao, "Got supported channel map: %s (type %s)\n",
|
MP_DBG(ao, "Got supported channel map: %s (type %s) -> %s -> %s\n",
|
||||||
mp_chmap_to_str(&entry),
|
aname, snd_pcm_chmap_type_name(maps[i]->type),
|
||||||
snd_pcm_chmap_type_name(maps[i]->type));
|
mp_chmap_to_str(&entry), mp_chmap_to_str(&reorder));
|
||||||
mp_chmap_sel_add_map(&chmap_sel, &entry);
|
mp_chmap_sel_add_map(&chmap_sel, &reorder);
|
||||||
} else {
|
} else {
|
||||||
char tmp[128];
|
MP_VERBOSE(ao, "skipping unknown ALSA channel map: %s\n", aname);
|
||||||
if (snd_pcm_chmap_print(&maps[i]->map, sizeof(tmp), tmp) > 0)
|
|
||||||
MP_VERBOSE(ao, "skipping unknown ALSA channel map: %s\n", tmp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user