context.modules = [
    { name = libpipewire-module-protocol-native }
    { name = libpipewire-module-metadata }
    { name = libpipewire-module-spa-device-factory }
    { name = libpipewire-module-spa-node-factory }
    { name = libpipewire-module-client-node }
    { name = libpipewire-module-client-device }
    { name = libpipewire-module-adapter }
]

wireplumber.settings.schema = {
  ## Bluetooth
  bluetooth.use-persistent-storage = {
    description = "Whether to use persistent BT storage or not"
    type = "bool"
    default = true
  }
  bluetooth.autoswitch-to-headset-profile = {
    description = "Whether to autoswitch to BT headset profile or not"
    type = "bool"
    default = true
  }

  ## Device
  device.restore-profile = {
    description = "Whether to restore device profile or not"
    type = "bool"
    default = true
  }
  device.restore-routes = {
    description = "Whether to restore device routes or not"
    type = "bool"
    default = true
  }
  device.routes.default-sink-volume = {
    description = "The default volume for sink devices"
    type = "float"
    default = 0.064
    min = 0.0
    max = 1.0
  }
  device.routes.default-source-volume = {
    description = "The default volume for source devices"
    type = "float"
    default = 1.0
    min = 0.0
    max = 1.0
  }

  ## Linking
  linking.allow-moving-streams = {
    description = "Whether to allow metadata to move streams at runtime or not"
    type = "bool"
    default = true
  }
  linking.follow-default-target = {
    description = "Whether to allow streams follow the default device or not"
    type = "bool"
    default = true
  }

  ## Monitor
  monitor.camera-discovery-timeout = {
    description = "The camera discovery timeout in milliseconds"
    type = "int"
    default = 1000
    min = 0
    max = 60000
  }

  ## Node
  node.features.audio.no-dsp = {
    description = "Whether to never convert audio to F32 format or not"
    type = "bool"
    default = false
  }
  node.features.audio.monitor-ports = {
    description = "Whether to enable monitor ports on audio nodes or not"
    type = "bool"
    default = true
  }
  node.features.audio.control-port = {
    description = "Whether to enable control ports on audio nodes or not"
    type = "bool"
    default = false
  }
  node.stream.restore-props = {
    description = "Whether to restore properties on stream nodes or not"
    type = "bool"
    default = true
  }
  node.stream.restore-target = {
    description = "Whether to restore target on stream nodes or not"
    type = "bool"
    default = true
  }
  node.stream.default-playback-volume = {
    description = "The default volume for playback nodes"
    type = "float"
    default = 1.0
    min = 0.0
    max = 1.0
  }
  node.stream.default-capture-volume = {
    description = "The default volume for capture nodes"
    type = "float"
    default = 1.0
    min = 0.0
    max = 1.0
  }
  node.filter.forward-format = {
    description = "Whether to forward format on filter nodes or not"
    type = "bool"
    default = false
  }
  node.restore-default-targets = {
    description = "Whether to restore default targets or not"
    type = "bool"
    default = true
  }
}
