sbp wrote: > Hi alidaf > > For controlling my USB DAC I can do it like this. First find the card > number: > > > Code: -------------------- > > > tc@piCorePlayer:~$ sudo cat /proc/asound/cards > 0 [ALSA ]: bcm2835 - bcm2835 ALSA > bcm2835 ALSA > 1 [Set ]: USB-Audio - C-Media USB Headphone Set > C-Media USB Headphone Set at usb-20980000.usb-1.2, full speed > -------------------- > > > > The USB card has number "1" > > Next I need to find the name of the controls for card "1": > > > Code: -------------------- > > > tc@piCorePlayer:~$ amixer -c 1 scontrols > Simple mixer control 'Headphone',0 > Simple mixer control 'Mic',0 > > Simple mixer control 'Auto Gain Control',0 > -------------------- > > > > > > So for controlling my USB DAC to 100% volumen I can use: > > Code: -------------------- > > > tc@piCorePlayer:~$ sudo amixer -c 1 set 'Headphone',0 100% > Simple mixer control 'Headphone',0 > Capabilities: pvolume pswitch pswitch-joined > Playback channels: Front Left - Front Right > Limits: Playback 0 - 151 > Mono: > Front Left: Playback 151 [100%] [-0.06dB] [on] > Front Right: Playback 151 [100%] [-0.06dB] [on] > -------------------- > > > > Hope you get the idea. > > Steen
I think I need to reorder the cards so the DAC is first. Any idea how I can do that persistently? I've read that editing a local .asoundrc can do it but on reboot that gets removed. I think that while I'm working on this I'll post detailed instructions on compiling for anyone that is interested in using a rotary encoder on the pi without a DAC. I think that going forward I may have to fork the code so that it reads a config file for the GPIO pins, which would make it more adaptable to anyone that wants to use different pins, or multiple encoders. That's a fair bit of work though and I don't know how to commit to the project or whether is should go upstream. I'm also not that familiar with c++ but it's way past time that I learned! ------------------------------------------------------------------------ alidaf's Profile: http://forums.slimdevices.com/member.php?userid=64775 View this thread: http://forums.slimdevices.com/showthread.php?t=97803 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
