aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch')
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch101
1 files changed, 37 insertions, 64 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
index 97b2e4064a..84c951940b 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
@@ -1,4 +1,4 @@
-From 6f814b40a01d03f93b36184c19339033949de472 Mon Sep 17 00:00:00 2001
+From d1c02971867bea10afcafc82c965414012c4d6bd Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanuk@iki.fi>
Date: Fri, 23 Oct 2015 12:23:13 +0300
Subject: [PATCH 1/4] card: add pa_card_profile.ports
@@ -9,23 +9,30 @@ availability (implemented in a later patch).
http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-Upstream-Status: Submitted [http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-October/024614.html]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+Rebased on 8.0.
+
+Upstream-Status: Denied [The patch set needs some work to be accepted.
+The review thread:
+http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
---
src/modules/alsa/alsa-mixer.c | 4 +++-
src/modules/alsa/alsa-ucm.c | 1 +
src/modules/bluetooth/module-bluez4-device.c | 6 ++++++
src/modules/bluetooth/module-bluez5-device.c | 6 ++++++
- src/pulsecore/card.c | 16 ++++++++++++++++
- src/pulsecore/card.h | 18 ++++++++++++------
+ src/pulsecore/card.c | 15 +++++++++++++++
+ src/pulsecore/card.h | 4 ++++
src/pulsecore/device-port.c | 7 ++++++-
- 7 files changed, 50 insertions(+), 8 deletions(-)
+ 7 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
-index 47cbd14..c5b82b0 100644
+index 1fe2a02..5b76b06 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
-@@ -4654,8 +4654,10 @@ static pa_device_port* device_port_alsa_init(pa_hashmap *ports, /* card ports */
+@@ -4783,8 +4783,10 @@ static pa_device_port* device_port_alsa_init(pa_hashmap *ports, /* card ports */
path->port = p;
}
@@ -38,10 +45,10 @@ index 47cbd14..c5b82b0 100644
if (extra) {
pa_hashmap_put(extra, p->name, p);
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
-index aa2d601..c8199d6 100644
+index 42f3242..68fcc26 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
-@@ -761,6 +761,7 @@ static void ucm_add_port_combination(
+@@ -791,6 +791,7 @@ static void ucm_add_port_combination(
if (cp) {
pa_log_debug("Adding profile %s to port %s.", cp->name, port->name);
pa_hashmap_put(port->profiles, cp->name, cp);
@@ -50,10 +57,10 @@ index aa2d601..c8199d6 100644
if (hash) {
diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index db69d34..b40c6a0 100644
+index 9a921a5..adecb32 100644
--- a/src/modules/bluetooth/module-bluez4-device.c
+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2183,6 +2183,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
+@@ -2180,6 +2180,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
p->max_sink_channels = 2;
p->max_source_channels = 0;
pa_hashmap_put(output_port->profiles, p->name, p);
@@ -61,7 +68,7 @@ index db69d34..b40c6a0 100644
d = PA_CARD_PROFILE_DATA(p);
*d = PA_BLUEZ4_PROFILE_A2DP;
-@@ -2194,6 +2195,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
+@@ -2191,6 +2192,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
p->max_sink_channels = 0;
p->max_source_channels = 2;
pa_hashmap_put(input_port->profiles, p->name, p);
@@ -69,7 +76,7 @@ index db69d34..b40c6a0 100644
d = PA_CARD_PROFILE_DATA(p);
*d = PA_BLUEZ4_PROFILE_A2DP_SOURCE;
-@@ -2206,6 +2208,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
+@@ -2203,6 +2205,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
p->max_source_channels = 1;
pa_hashmap_put(input_port->profiles, p->name, p);
pa_hashmap_put(output_port->profiles, p->name, p);
@@ -78,7 +85,7 @@ index db69d34..b40c6a0 100644
d = PA_CARD_PROFILE_DATA(p);
*d = PA_BLUEZ4_PROFILE_HSP;
-@@ -2218,6 +2222,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
+@@ -2215,6 +2219,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
p->max_source_channels = 1;
pa_hashmap_put(input_port->profiles, p->name, p);
pa_hashmap_put(output_port->profiles, p->name, p);
@@ -88,7 +95,7 @@ index db69d34..b40c6a0 100644
d = PA_CARD_PROFILE_DATA(p);
*d = PA_BLUEZ4_PROFILE_HFGW;
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
-index 7238e6f..3321785 100644
+index 84e6d55..b015c67 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
@@ -1790,6 +1790,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
@@ -126,18 +133,18 @@ index 7238e6f..3321785 100644
p = PA_CARD_PROFILE_DATA(cp);
*p = PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY;
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index 6f9391e..cc4c784 100644
+index b6cbbf7..f92ac87 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
-@@ -50,6 +50,7 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
- c->n_sinks = c->n_sources = 0;
- c->max_sink_channels = c->max_source_channels = 0;
+@@ -45,6 +45,7 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
+ c->name = pa_xstrdup(name);
+ c->description = pa_xstrdup(description);
c->available = PA_AVAILABLE_UNKNOWN;
+ c->ports = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
return c;
}
-@@ -57,11 +58,25 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
+@@ -52,6 +53,14 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
void pa_card_profile_free(pa_card_profile *c) {
pa_assert(c);
@@ -149,8 +156,10 @@ index 6f9391e..cc4c784 100644
+ pa_hashmap_free(c->ports);
+ }
+
+ pa_xfree(c->input_name);
+ pa_xfree(c->output_name);
pa_xfree(c->name);
- pa_xfree(c->description);
+@@ -59,6 +68,12 @@ void pa_card_profile_free(pa_card_profile *c) {
pa_xfree(c);
}
@@ -163,47 +172,11 @@ index 6f9391e..cc4c784 100644
void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available) {
pa_core *core;
-@@ -198,6 +213,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
-
- c->userdata = NULL;
- c->set_profile = NULL;
-+ c->active_profile = NULL;
-
- pa_device_init_description(c->proplist, c);
- pa_device_init_icon(c->proplist, true);
diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index 3e2c004..1c33958 100644
+index 30bfc0e..fff9057 100644
--- a/src/pulsecore/card.h
+++ b/src/pulsecore/card.h
-@@ -22,19 +22,21 @@
-
- typedef struct pa_card pa_card;
-
--#include <pulse/proplist.h>
--#include <pulsecore/core.h>
--#include <pulsecore/module.h>
--#include <pulsecore/idxset.h>
--
- /* This enum replaces pa_port_available_t (defined in pulse/def.h) for
-- * internal use, so make sure both enum types stay in sync. */
-+ * internal use, so make sure both enum types stay in sync. This is defined
-+ * before the #includes, because device-port.h depends on this enum. */
- typedef enum pa_available {
- PA_AVAILABLE_UNKNOWN = 0,
- PA_AVAILABLE_NO = 1,
- PA_AVAILABLE_YES = 2,
- } pa_available_t;
-
-+#include <pulse/proplist.h>
-+#include <pulsecore/core.h>
-+#include <pulsecore/device-port.h>
-+#include <pulsecore/module.h>
-+#include <pulsecore/idxset.h>
-+
- typedef struct pa_card_profile {
- pa_card *card;
- char *name;
-@@ -43,6 +45,8 @@ typedef struct pa_card_profile {
+@@ -50,6 +50,8 @@ struct pa_card_profile {
unsigned priority;
pa_available_t available; /* PA_AVAILABLE_UNKNOWN, PA_AVAILABLE_NO or PA_AVAILABLE_YES */
@@ -212,7 +185,7 @@ index 3e2c004..1c33958 100644
/* We probably want to have different properties later on here */
unsigned n_sinks;
unsigned n_sources;
-@@ -100,6 +104,8 @@ typedef struct pa_card_new_data {
+@@ -107,6 +109,8 @@ typedef struct pa_card_new_data {
pa_card_profile *pa_card_profile_new(const char *name, const char *description, size_t extra);
void pa_card_profile_free(pa_card_profile *c);
@@ -222,10 +195,10 @@ index 3e2c004..1c33958 100644
void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available);
diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
-index cfe2a80..f16ecef 100644
+index 5807d3e..d12dfbc 100644
--- a/src/pulsecore/device-port.c
+++ b/src/pulsecore/device-port.c
-@@ -95,8 +95,13 @@ static void device_port_free(pa_object *o) {
+@@ -107,8 +107,13 @@ static void device_port_free(pa_object *o) {
if (p->proplist)
pa_proplist_free(p->proplist);
@@ -238,8 +211,8 @@ index cfe2a80..f16ecef 100644
pa_hashmap_free(p->profiles);
+ }
+ pa_xfree(p->preferred_profile);
pa_xfree(p->name);
- pa_xfree(p->description);
--
-2.1.4
+2.7.0