mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
alsa: Reinitialise the mixer on port change.
This allows us to flip from software to hardware volume control as the port's mixer path dictates.
This commit is contained in:
parent
a9cf320bc1
commit
6c6b50d6a8
11 changed files with 315 additions and 120 deletions
|
|
@ -1523,7 +1523,6 @@ int pa__init(pa_module*m) {
|
|||
}
|
||||
|
||||
u->source = pa_source_new(m->core, &source_data,
|
||||
PA_SOURCE_DECIBEL_VOLUME|
|
||||
(source_master->flags & (PA_SOURCE_LATENCY|PA_SOURCE_DYNAMIC_LATENCY)));
|
||||
pa_source_new_data_done(&source_data);
|
||||
|
||||
|
|
@ -1535,6 +1534,7 @@ int pa__init(pa_module*m) {
|
|||
u->source->parent.process_msg = source_process_msg_cb;
|
||||
u->source->set_state = source_set_state_cb;
|
||||
u->source->update_requested_latency = source_update_requested_latency_cb;
|
||||
pa_source_enable_decibel_volume(u->source, TRUE);
|
||||
pa_source_set_get_volume_callback(u->source, source_get_volume_cb);
|
||||
pa_source_set_set_volume_callback(u->source, source_set_volume_cb);
|
||||
pa_source_set_get_mute_callback(u->source, source_get_mute_cb);
|
||||
|
|
@ -1571,7 +1571,6 @@ int pa__init(pa_module*m) {
|
|||
}
|
||||
|
||||
u->sink = pa_sink_new(m->core, &sink_data,
|
||||
PA_SINK_DECIBEL_VOLUME|
|
||||
(sink_master->flags & (PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY)));
|
||||
pa_sink_new_data_done(&sink_data);
|
||||
|
||||
|
|
@ -1584,6 +1583,7 @@ int pa__init(pa_module*m) {
|
|||
u->sink->set_state = sink_set_state_cb;
|
||||
u->sink->update_requested_latency = sink_update_requested_latency_cb;
|
||||
u->sink->request_rewind = sink_request_rewind_cb;
|
||||
pa_sink_enable_decibel_volume(u->sink, TRUE);
|
||||
pa_sink_set_set_volume_callback(u->sink, sink_set_volume_cb);
|
||||
pa_sink_set_set_mute_callback(u->sink, sink_set_mute_cb);
|
||||
u->sink->userdata = u;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue