Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ALSA softvol plugin #293

Merged
merged 1 commit into from
May 7, 2016

Conversation

joerg-krause
Copy link

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 cannot 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 and the ALSA PCM library reference.

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.

Note, that this feature was not tested on device with a hardware mixer!

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.
@mikebrady
Copy link
Owner

This looks interesting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants