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

Adding volume control using Phat DAC #53

Closed
web-sto opened this issue Apr 26, 2016 · 3 comments
Closed

Adding volume control using Phat DAC #53

web-sto opened this issue Apr 26, 2016 · 3 comments

Comments

@web-sto
Copy link

web-sto commented Apr 26, 2016

Hello,

first of all thanks for the litte piece of magic work delivering after 30min of setup, what more than 2 days of pusleaudio & co. could not deliver. Great work!!!

I'd say I have a rather standard setup.

  • Ubuntu server running snapserver & mpd
  • 2 raspi clients running snapclient

Using the 3.5mm audio jack the setup on clients was running fine, with the issue of the well known bad quality of the sound using this output mode of a raspi. So I invested in 2 Phat DACs. The new setup run out of the box.

But, no volume control anymore possible. Some recherche told me this is normal behavior of this hardware. Well some more recherche introduced the ALSA plugin softvol to me being an option to try.

I managed to get this plugin to work, meaning I've got a volume control able to control volume of application except snapclient. (applying -s parameter pointing on the new plugin device).

Any help possible from the experts out there for a new user of snapcast?

Thanks in advance

STO

Some output:
pi@raspberrypi:~ $ snapclient -l
0: null
Discard all samples (playback) or generate zero samples (capture)
1: default
2: softvole
3: sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac,
Default Audio Device
4: dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample mixing device
5: dsnoop:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample snooping device
6: hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct hardware device without any conversions
7: plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Hardware device with all software conversions

pi@raspberrypi:~ $ vi /home/pi/.asoundrc
pcm.!default {
type plug
slave.pcm "softvole"
}
pcm.softvole {
type softvol
slave {
pcm "sysdefault"
}
control {
name "softvolume"
card 0
}
}

@badaix
Copy link
Owner

badaix commented Apr 26, 2016

The Snapclient can adjust the volume with it's build-in SW mixer. You can control it with the Android App or e.g. with this Python client, see #29

@happyleavesaoc
Copy link
Contributor

Just to be accurate, there are two pieces to that project:

  1. Python-based control: This part adjusts the volume, mute, etc
  2. Python-based client: This part actually connects to the server and plays music like the C++ and Android clients. Note that its based on the 0.5.0 beta.

@web-sto
Copy link
Author

web-sto commented Apr 27, 2016

Thanks for the quick feedback.

As I'm planning a sort of Multi-room application not being keen running snapclient on android hardware, I was not aware what the android client provides. But at the end it is what I was looking for.

I even became aware of the server site server.json file. I suppose being a sort of the config file. I was able to achieve volume control playing with the parameters (snapserver not running), so android client would be necessary. Is this correct ?

As the little raspberry pi recently step into my technical live, of course python starts to get more space in my programming live, I will have a look on the python-based applications.

Thanks.

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

No branches or pull requests

3 participants