mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
set reserve interface application device name
This commit is contained in:
parent
03ac71bcad
commit
8314858183
5 changed files with 48 additions and 1 deletions
|
|
@ -132,6 +132,17 @@ static void reserve_done(struct userdata *u) {
|
|||
}
|
||||
}
|
||||
|
||||
static void reserve_update(struct userdata *u) {
|
||||
const char *description;
|
||||
pa_assert(u);
|
||||
|
||||
if (!u->source)
|
||||
return;
|
||||
|
||||
if ((description = pa_proplist_gets(u->source->proplist, PA_PROP_DEVICE_DESCRIPTION)))
|
||||
pa_reserve_wrapper_set_application_device_name(u->reserve, description);
|
||||
}
|
||||
|
||||
static int reserve_init(struct userdata *u, const char *dname) {
|
||||
char *rname;
|
||||
|
||||
|
|
@ -151,6 +162,8 @@ static int reserve_init(struct userdata *u, const char *dname) {
|
|||
if (!(u->reserve))
|
||||
return -1;
|
||||
|
||||
reserve_update(u);
|
||||
|
||||
pa_assert(!u->reserve_slot);
|
||||
u->reserve_slot = pa_hook_connect(pa_reserve_wrapper_hook(u->reserve), PA_HOOK_NORMAL, (pa_hook_cb_t) reserve_cb, u);
|
||||
|
||||
|
|
@ -1522,6 +1535,8 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
|
|||
pa_log_info("Time scheduling watermark is %0.2fms",
|
||||
(double) pa_bytes_to_usec(u->tsched_watermark, &ss) / PA_USEC_PER_MSEC);
|
||||
|
||||
reserve_update(u);
|
||||
|
||||
if (update_sw_params(u) < 0)
|
||||
goto fail;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue