mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
alsa-source: Bring reconfigure in line with alsa-sink
This got fixed for new API expectations (channel map will always be set), so keep things up-to-date.
This commit is contained in:
parent
e79cefb723
commit
09e8033c49
1 changed files with 11 additions and 2 deletions
|
|
@ -1639,9 +1639,8 @@ static int source_reconfigure_cb(pa_source *s, pa_sample_spec *spec, pa_channel_
|
|||
bool format_supported = false;
|
||||
bool rate_supported = false;
|
||||
bool channels_supported = false;
|
||||
#ifdef USE_SMOOTHER_2
|
||||
pa_sample_spec effective_spec;
|
||||
#endif
|
||||
pa_channel_map effective_map;
|
||||
|
||||
pa_assert(u);
|
||||
|
||||
|
|
@ -1687,6 +1686,16 @@ static int source_reconfigure_cb(pa_source *s, pa_sample_spec *spec, pa_channel_
|
|||
effective_spec.channels = u->verified_sample_spec.channels;
|
||||
}
|
||||
|
||||
/* We con't actually support configuring the channel map, so let's do the best we can */
|
||||
pa_channel_map_init_auto(&effective_map, effective_spec.channels, PA_CHANNEL_MAP_ALSA);
|
||||
if (!pa_channel_map_equal(map, &effective_map)) {
|
||||
char req_map_str[PA_CHANNEL_MAP_SNPRINT_MAX], eff_map_str[PA_CHANNEL_MAP_SNPRINT_MAX];
|
||||
|
||||
pa_log_info("Cannot set channel map to %s, using default of %s",
|
||||
pa_channel_map_snprint(req_map_str, sizeof(req_map_str), map),
|
||||
pa_channel_map_snprint(eff_map_str, sizeof(eff_map_str), &effective_map));
|
||||
}
|
||||
|
||||
pa_source_set_sample_spec(u->source, &effective_spec, map);
|
||||
|
||||
#if USE_SMOOTHER_2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue