]> code.delx.au - pulseaudio/commitdiff
sink: Add a SET_FORMATS flag
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 16 Aug 2011 05:41:34 +0000 (11:11 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 16 Aug 2011 05:41:34 +0000 (11:11 +0530)
This adds a PA_SINK_SET_FORMATS flag to the pa_sink_flags enum,
signalling that a sink allows the set of supported formats to be set
externally. The idea is for clients to be able to know what sinks
support this ability and adapt their UI appropriately.

src/pulse/def.h
src/utils/pactl.c

index 32169deb3e66163a6e9fa707ca3f3fe9ddffd5ed..96aea19379248bf0d8b4007cb63fd85c34988dfe 100644 (file)
@@ -756,6 +756,10 @@ typedef enum pa_sink_flags {
      * sinks). */
 /** \endcond */
 
+    PA_SINK_SET_FORMATS = 0x0400U,
+    /**< The sink allows setting what formats are supported by the connected
+     * hardware. The actual functionality to do this might be provided by an
+     * extension. \since 1.0 */
 } pa_sink_flags_t;
 
 /** \cond fulldocs */
index 947c6e9866056b0087802ce0c69801b06449bd31..21ceecee181b653220ed9aa9599cdb4aa10a9f2a 100644 (file)
@@ -271,7 +271,7 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
              "\tBase Volume: %s%s%s\n"
              "\tMonitor Source: %s\n"
              "\tLatency: %0.0f usec, configured %0.0f usec\n"
-             "\tFlags: %s%s%s%s%s%s\n"
+             "\tFlags: %s%s%s%s%s%s%s\n"
              "\tProperties:\n\t\t%s\n"),
            i->index,
            state_table[1+i->state],
@@ -297,6 +297,7 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_
            i->flags & PA_SINK_HW_VOLUME_CTRL ? "HW_VOLUME_CTRL " : "",
            i->flags & PA_SINK_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
            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"));
 
     pa_xfree(pl);