]> git.ipfire.org Git - thirdparty/shairport-sync.git/commit
Add support for ALSA softvol plugin 293/head
authorJörg Krause <joerg.krause@embedded.rocks>
Fri, 6 May 2016 20:03:44 +0000 (22:03 +0200)
committerJörg Krause <joerg.krause@embedded.rocks>
Fri, 6 May 2016 20:23:16 +0000 (22:23 +0200)
commitf3dcf8d69b724c51aa56d181f549e93c0757c084
tree5f617f38cbfad7c47eb616f81b6e22a66bcaa8b7
parentcc040329369b6b163445e03b810e74293cea7c68
Add support for ALSA softvol plugin

The ALSA softvol plugin allows the user to add a new volume control and control
the sound volume by software. This is necessary if the sound card can't control
the volume by hardware.

An example configuration in the `~/.asoundrc` file might look like this:
```
pcm.softvol {
  type softvol
  slave {
    pcm "hw:0"
  }
  control {
    name "Master"
    card 0
  }
  min_dB -57.2
  max_dB -6.2
}
ctl.softvol {
  type hw
  card 0
}
```

The corresponding entries in the shairport-sync would be:
```
alsa =
{
  output_device = "softvol";
  mixer_control_name = "Master";
}
```

Please check the (ALSA documentation)[http://alsa.opensrc.org/Softvol] and the
(ALSA PCM library reference)[http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html]

If shairport-syncs alsa backend does not have success in getting the dB volume
information from the hardware device it tries to get these information from a
software volume control with the name mixer device name as for the hardware
mixer.
audio_alsa.c