Use FLAT volume for RAOP sink 95/188795/6 submit/tizen/20180919.075319
authorSeungbae Shin <seungbae.shin@samsung.com>
Mon, 10 Sep 2018 09:48:38 +0000 (18:48 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Wed, 19 Sep 2018 07:50:13 +0000 (16:50 +0900)
[Version] 11.1-49
[Issue Type] Feature

Change-Id: I73ea8f291c7f4563c73020a977b93ce1530f7806

packaging/pulseaudio.spec
src/modules/raop/raop-sink.c
src/utils/pactl.c

index ca027f9..2e9f60b 100644 (file)
@@ -3,7 +3,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          11.1
-Release:          48
+Release:          49
 Group:            Multimedia/Audio
 License:          LGPL-2.1
 URL:              http://pulseaudio.org
index e5d219e..f1224e9 100644 (file)
@@ -565,6 +565,9 @@ pa_sink* pa_raop_sink_new(pa_module *m, pa_modargs *ma, const char *driver) {
     pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, server);
     pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "music");
     pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "RAOP sink '%s'", server);
+#ifdef __TIZEN__
+    pa_proplist_sets(data.proplist, PA_PROP_DEVICE_API, "raop");
+#endif
 
     if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
         pa_log("Invalid properties");
@@ -572,7 +575,11 @@ pa_sink* pa_raop_sink_new(pa_module *m, pa_modargs *ma, const char *driver) {
         goto fail;
     }
 
+#ifdef __TIZEN__
+    u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY | PA_SINK_NETWORK | PA_SINK_FLAT_VOLUME);
+#else
     u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY | PA_SINK_NETWORK);
+#endif
     pa_sink_new_data_done(&data);
 
     if (!(u->sink)) {
index e9bf005..eb02a18 100644 (file)
@@ -292,7 +292,11 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
              "\tBase Volume: %s\n"
              "\tMonitor Source: %s\n"
              "\tLatency: %0.0f usec, configured %0.0f usec\n"
+#ifdef __TIZEN__
+             "\tFlags: %s%s%s%s%s%s%s%s\n"
+#else
              "\tFlags: %s%s%s%s%s%s%s\n"
+#endif
              "\tProperties:\n\t\t%s\n"),
            i->index,
            state_table[1+i->state],
@@ -313,6 +317,9 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
            i->flags & PA_SINK_HW_MUTE_CTRL ? "HW_MUTE_CTRL " : "",
            i->flags & PA_SINK_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
            i->flags & PA_SINK_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
+#ifdef __TIZEN__
+           i->flags & PA_SINK_FLAT_VOLUME ? "FLAT_VOLUME " : "",
+#endif
            i->flags & PA_SINK_LATENCY ? "LATENCY " : "",
            i->flags & PA_SINK_SET_FORMATS ? "SET_FORMATS " : "",
            pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));