summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch')
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch61
1 files changed, 0 insertions, 61 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
deleted file mode 100644
index 2f72ceb33b..0000000000
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1From 9c3cdfcd198ef9727ea542f284ac6d8c1bcd7a3a Mon Sep 17 00:00:00 2001
2From: Tanu Kaskinen <tanuk@iki.fi>
3Date: Fri, 23 Oct 2015 12:36:34 +0300
4Subject: [PATCH 1/5] alsa, bluetooth: fail if user-requested profile doesn't
5 exist
6
7If we can't fulfill the user request fully, I think we shouldn't
8fulfill it at all, to make it clear that the requested operation
9didn't succeed.
10
11Upstream-Status: Accepted [expected in 10.0]
12
13Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
14---
15 src/modules/alsa/module-alsa-card.c | 11 +++++++++--
16 src/modules/bluetooth/module-bluez4-device.c | 7 +++++--
17 2 files changed, 14 insertions(+), 4 deletions(-)
18
19diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
20index e5cc4ae..d761683 100644
21--- a/src/modules/alsa/module-alsa-card.c
22+++ b/src/modules/alsa/module-alsa-card.c
23@@ -799,8 +799,15 @@ int pa__init(pa_module *m) {
24 goto fail;
25 }
26
27- if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL)))
28- pa_card_new_data_set_profile(&data, profile);
29+ if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
30+ if (pa_hashmap_get(data.profiles, profile))
31+ pa_card_new_data_set_profile(&data, profile);
32+ else {
33+ pa_log("No such profile: %s", profile);
34+ pa_card_new_data_done(&data);
35+ goto fail;
36+ }
37+ }
38
39 u->card = pa_card_new(m->core, &data);
40 pa_card_new_data_done(&data);
41diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
42index 9a921a5..a2de525 100644
43--- a/src/modules/bluetooth/module-bluez4-device.c
44+++ b/src/modules/bluetooth/module-bluez4-device.c
45@@ -2301,8 +2301,11 @@ static int add_card(struct userdata *u) {
46 if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
47 if (pa_hashmap_get(data.profiles, default_profile))
48 pa_card_new_data_set_profile(&data, default_profile);
49- else
50- pa_log_warn("Profile '%s' not valid or not supported by device.", default_profile);
51+ else {
52+ pa_log("Profile '%s' not valid or not supported by device.", default_profile);
53+ pa_card_new_data_done(&data);
54+ return -1;
55+ }
56 }
57
58 u->card = pa_card_new(u->core, &data);
59--
602.8.1
61