mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	Move node.pause-on-idle setting to config files
So that we can configure it. Add some more docs to the config file
This commit is contained in:
		
							parent
							
								
									0f028dab40
								
							
						
					
					
						commit
						ecd1d3e1d7
					
				
					 9 changed files with 114 additions and 42 deletions
				
			
		| 
						 | 
				
			
			@ -273,7 +273,6 @@ static const struct spa_dict_item node_info_items[] = {
 | 
			
		|||
	{ SPA_KEY_DEVICE_API, "alsa" },
 | 
			
		||||
	{ SPA_KEY_MEDIA_CLASS, "Audio/Sink" },
 | 
			
		||||
	{ SPA_KEY_NODE_DRIVER, "true" },
 | 
			
		||||
	{ SPA_KEY_NODE_PAUSE_ON_IDLE, "false" },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static void emit_node_info(struct state *this, bool full)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -275,7 +275,6 @@ static const struct spa_dict_item node_info_items[] = {
 | 
			
		|||
	{ SPA_KEY_DEVICE_API, "alsa" },
 | 
			
		||||
	{ SPA_KEY_MEDIA_CLASS, "Audio/Source" },
 | 
			
		||||
	{ SPA_KEY_NODE_DRIVER, "true" },
 | 
			
		||||
	{ SPA_KEY_NODE_PAUSE_ON_IDLE, "false" },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static void emit_node_info(struct state *this, bool full)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -823,7 +823,6 @@ static const struct spa_dict_item node_info_items[] = {
 | 
			
		|||
	{ SPA_KEY_MEDIA_CLASS, "Audio/Sink" },
 | 
			
		||||
	{ SPA_KEY_NODE_DRIVER, "true" },
 | 
			
		||||
	{ SPA_KEY_NODE_LATENCY, SPA_STRINGIFY(MIN_LATENCY)"/48000" },
 | 
			
		||||
	{ SPA_KEY_NODE_PAUSE_ON_IDLE, "false" },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static void emit_node_info(struct impl *this, bool full)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -704,7 +704,6 @@ static void emit_node_info(struct impl *this, bool full)
 | 
			
		|||
		{ SPA_KEY_DEVICE_API, "bluez5" },
 | 
			
		||||
		{ SPA_KEY_MEDIA_CLASS, "Stream/Output/Audio" },
 | 
			
		||||
		{ SPA_KEY_NODE_LATENCY, SPA_STRINGIFY(MIN_LATENCY)"/48000" },
 | 
			
		||||
		{ SPA_KEY_NODE_PAUSE_ON_IDLE, "false" },
 | 
			
		||||
		{ "media.name", ((this->transport && this->transport->device->name) ?
 | 
			
		||||
		                 this->transport->device->name : "A2DP") },
 | 
			
		||||
	};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -323,7 +323,6 @@ static const struct spa_dict_item info_items[] = {
 | 
			
		|||
	{ SPA_KEY_DEVICE_API, "v4l2" },
 | 
			
		||||
	{ SPA_KEY_MEDIA_CLASS, "Video/Source" },
 | 
			
		||||
	{ SPA_KEY_MEDIA_ROLE, "Camera" },
 | 
			
		||||
	{ SPA_KEY_NODE_PAUSE_ON_IDLE, "false" },
 | 
			
		||||
	{ SPA_KEY_NODE_DRIVER, "true" },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
# alsa-monitor config file
 | 
			
		||||
properties = {
 | 
			
		||||
    # Create a JACK device
 | 
			
		||||
    #alsa.jack-device = true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -11,21 +12,52 @@ rules = [
 | 
			
		|||
        # matches work, the actions are executed for the object.
 | 
			
		||||
        matches = [
 | 
			
		||||
            {
 | 
			
		||||
	        # this matches all cards
 | 
			
		||||
	        # this matches all cards. These are regular expressions
 | 
			
		||||
		# so "." matches one character and ".*" matches many.
 | 
			
		||||
                device.name = "~alsa_card.*"
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
        actions = {
 | 
			
		||||
            # actions can update properties on the matched object.
 | 
			
		||||
            update-props = {
 | 
			
		||||
	        # Use ALSA-Card-Profile devices. They use UCM or
 | 
			
		||||
		# the profile configuration to configure the device
 | 
			
		||||
		# and mixer settings.
 | 
			
		||||
                api.alsa.use-acp = 		true
 | 
			
		||||
 | 
			
		||||
		# Use UCM instead of profile when available. Can be
 | 
			
		||||
		# disabled to skip trying to use the UCM profile
 | 
			
		||||
                #api.alsa.use-ucm = 		true
 | 
			
		||||
 | 
			
		||||
		# Don't use the hardware mixer for volume control. It
 | 
			
		||||
		# will only use software volume. The mixer is still used
 | 
			
		||||
		# to mute unused paths based on the selected port
 | 
			
		||||
                #api.alsa.soft-mixer = 		false
 | 
			
		||||
 | 
			
		||||
                # Ignore Decibel settings of the driver. Can be used to
 | 
			
		||||
		# work around buggy drivers that report wrong values
 | 
			
		||||
                #api.alsa.ignore-dB = 		false
 | 
			
		||||
 | 
			
		||||
                # The profile set to use for the device. Usually this
 | 
			
		||||
		# "default.conf" but can be changed with a udev rule
 | 
			
		||||
		# or here.
 | 
			
		||||
                #device.profile-set = 		"profileset-name"
 | 
			
		||||
 | 
			
		||||
		# The default active profile. Is by defaul set to "Off"
 | 
			
		||||
                #device.profile = 		"default profile name"
 | 
			
		||||
 | 
			
		||||
		# Automatically select the best profile. This is the
 | 
			
		||||
		# highest priority available profile. This is disabled
 | 
			
		||||
		# here and instead implemented in the session manager
 | 
			
		||||
		# where it can save and load previous preferences
 | 
			
		||||
                api.acp.auto-profile = 	false
 | 
			
		||||
 | 
			
		||||
		# Automatically switch to the highest priority available
 | 
			
		||||
		# port. This is disabled here and implemented in the
 | 
			
		||||
		# session manager instead.
 | 
			
		||||
                api.acp.auto-port = 	false
 | 
			
		||||
 | 
			
		||||
		# Other properties can be set here
 | 
			
		||||
                #device.nick = 			"My Device"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -33,7 +65,8 @@ rules = [
 | 
			
		|||
    {
 | 
			
		||||
        matches = [
 | 
			
		||||
            {
 | 
			
		||||
	        # matches all sinks
 | 
			
		||||
	        # matches all sinks. These are regular expressions
 | 
			
		||||
		# so "." matches one character and ".*" matches many.
 | 
			
		||||
                node.name = "~alsa_input.*"
 | 
			
		||||
            }
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -47,7 +80,7 @@ rules = [
 | 
			
		|||
                #node.nick = 			null
 | 
			
		||||
                #priority.driver = 		100
 | 
			
		||||
                #priority.session = 		100
 | 
			
		||||
                #node.pause-on-idle = 		false
 | 
			
		||||
                node.pause-on-idle = 		false
 | 
			
		||||
                #resample.quality = 		4
 | 
			
		||||
                #channelmix.normalize =		false
 | 
			
		||||
                #channelmix.mix-lfe = 		false
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,7 +54,7 @@ rules = [
 | 
			
		|||
                #node.nick = 			null
 | 
			
		||||
                #priority.driver = 		100
 | 
			
		||||
                #priority.session = 		100
 | 
			
		||||
                #node.pause-on-idle = 		false
 | 
			
		||||
                node.pause-on-idle = 		false
 | 
			
		||||
                #resample.quality = 		4
 | 
			
		||||
                #channelmix.normalize =		false
 | 
			
		||||
                #channelmix.mix-lfe = 		false
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@ rules = [
 | 
			
		|||
                #node.nick = 			null
 | 
			
		||||
                #priority.driver = 		100
 | 
			
		||||
                #priority.session = 		100
 | 
			
		||||
                #node.pause-on-idle = 		true
 | 
			
		||||
                node.pause-on-idle = 		false
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,52 +41,95 @@ spa-libs = {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
modules = {
 | 
			
		||||
    ##  <module-name> = { [args = "<key>=<value> ..."] 
 | 
			
		||||
    #                     [flags = [ifexists]|[nofail]}
 | 
			
		||||
    ##  <module-name> = { [args = { <key>=<value> ... }]
 | 
			
		||||
    #                     [flags = "[ifexists]|[nofail]"}
 | 
			
		||||
    #
 | 
			
		||||
    # Loads a module with the given parameters.
 | 
			
		||||
    # If ifexists is given, the module is ignoed when it is not found.
 | 
			
		||||
    # If nofail is given, module initialization failures are ignored.
 | 
			
		||||
    #
 | 
			
		||||
 | 
			
		||||
    # Uses RTKit to boost the data thread priority
 | 
			
		||||
    libpipewire-module-rtkit  = {
 | 
			
		||||
        "#args" = { nice.level = -11
 | 
			
		||||
	            rt.prio = 20
 | 
			
		||||
                    rt.time.soft = 200000
 | 
			
		||||
                    rt.time.hard = 200000 }
 | 
			
		||||
        "flags" = "ifexists|nofail"
 | 
			
		||||
        args = {
 | 
			
		||||
            #nice.level = -11
 | 
			
		||||
            #rt.prio = 20
 | 
			
		||||
            #rt.time.soft = 200000
 | 
			
		||||
            #rt.time.hard = 200000
 | 
			
		||||
	}
 | 
			
		||||
        flags = "ifexists|nofail"
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # The native communication protocol
 | 
			
		||||
    libpipewire-module-protocol-native = null
 | 
			
		||||
 | 
			
		||||
    # The profile module. Allows application to access profiler
 | 
			
		||||
    # and performance data. It provides an interface that is used
 | 
			
		||||
    # by pw-top and pw-profiler.
 | 
			
		||||
    libpipewire-module-profiler = null
 | 
			
		||||
 | 
			
		||||
    # Allows applications to create metadata objects. It creates
 | 
			
		||||
    # a factory for Metadata objects.
 | 
			
		||||
    libpipewire-module-metadata = null
 | 
			
		||||
 | 
			
		||||
    # Creates a factory for making devices that run in the
 | 
			
		||||
    # context of the PipeWire server.
 | 
			
		||||
    libpipewire-module-spa-device-factory = null
 | 
			
		||||
 | 
			
		||||
    # Creates a factory for making nodes that run in the
 | 
			
		||||
    # context of the PipeWire server.
 | 
			
		||||
    libpipewire-module-spa-node-factory = null
 | 
			
		||||
 | 
			
		||||
    # Allows creating nodes that run in the context of the
 | 
			
		||||
    # client. Is used by all clients that want to provide
 | 
			
		||||
    # data to PipeWire.
 | 
			
		||||
    libpipewire-module-client-node = null
 | 
			
		||||
 | 
			
		||||
    # Allows creating devices that run in the context of the
 | 
			
		||||
    # client. Is used by the session manager.
 | 
			
		||||
    libpipewire-module-client-device = null
 | 
			
		||||
 | 
			
		||||
    # The portal module monitors the PID of the portal process
 | 
			
		||||
    # and tags connections with the same PID as portal
 | 
			
		||||
    # connections.
 | 
			
		||||
    libpipewire-module-portal = null
 | 
			
		||||
 | 
			
		||||
    # The access module can perform acces checks and block
 | 
			
		||||
    # new clients.
 | 
			
		||||
    libpipewire-module-access = {
 | 
			
		||||
        "#args" = {
 | 
			
		||||
        args = {
 | 
			
		||||
            # access.allowed to list an array of paths of allowed
 | 
			
		||||
            # apps.
 | 
			
		||||
                    access.allowed = [
 | 
			
		||||
		          @media_session_path@
 | 
			
		||||
	            ]
 | 
			
		||||
            #access.allowed = [
 | 
			
		||||
            #    @media_session_path@
 | 
			
		||||
            #]
 | 
			
		||||
 | 
			
		||||
            # an array of rejected paths
 | 
			
		||||
		    access.rejected = [ ]
 | 
			
		||||
            #access.rejected = [ ]
 | 
			
		||||
 | 
			
		||||
            # an array of paths with restricted access
 | 
			
		||||
		    access.restricted = [ ]
 | 
			
		||||
            #access.restricted = [ ]
 | 
			
		||||
 | 
			
		||||
            # anything not in the above lists gets assigned the
 | 
			
		||||
            # access.force permission.
 | 
			
		||||
                    access.force = flatpak
 | 
			
		||||
            #access.force = flatpak
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # Makes a factory for wrapping nodes in an adapter with a
 | 
			
		||||
    # converter and resampler.
 | 
			
		||||
    libpipewire-module-adapter = null
 | 
			
		||||
 | 
			
		||||
    # Makes a factory for creating links between ports
 | 
			
		||||
    libpipewire-module-link-factory = null
 | 
			
		||||
 | 
			
		||||
    # Provides factories to make session manager objects
 | 
			
		||||
    libpipewire-module-session-manager = null
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
objects = {
 | 
			
		||||
    ## <factory-name> = { [args = "<key>=<value> ..."]
 | 
			
		||||
    #                     [flags = nofail] }
 | 
			
		||||
    ## <factory-name> = { [args = { <key>=<value> ... } ]
 | 
			
		||||
    #                     [flags = "nofail"] }
 | 
			
		||||
    #
 | 
			
		||||
    # Creates an object from a PipeWire factory with the given parameters.
 | 
			
		||||
    # If nofail is given, errors are ignored (and no object is created)
 | 
			
		||||
| 
						 | 
				
			
			@ -101,7 +144,8 @@ objects = {
 | 
			
		|||
    # A default dummy driver. This handles nodes marked with the "node.always-driver"
 | 
			
		||||
    # property when no other driver is currently active. JACK clients need this.
 | 
			
		||||
    spa-node-factory = {
 | 
			
		||||
        args = { factory.name = support.node.driver
 | 
			
		||||
        args = {
 | 
			
		||||
            factory.name = support.node.driver
 | 
			
		||||
            node.name = Dummy-Driver
 | 
			
		||||
            priority.driver = 8000
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue