Go Back   Home > Forums > Source & Line > PC Based

PC Based Computer music servers, crossovers, and equalization

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 23rd October 2012, 11:27 PM   #11
diyAudio Member
 
dsavitsk's Avatar
 
Join Date: Jan 2005
Location: Hartford
If you install Vortexbox Linux, you can run its local player which is just a software version of a squeezebox. Or, if you must stay with Windows, there is Softsqueeze which is the same thing.
  Reply With Quote
Old 27th November 2012, 04:29 AM   #12
diyAudio Member
 
Join Date: Jul 2008
Location: santa clara, CA
my solution is to use the linux MPD architecture, install mpd server on a back-end box and connect over android/wifi using mpdroid or similar. that controls the shuttle (playlist, pause/skip,etc).

what I also have going (which is pretty custom) is a link between the volume control slider on mpd (and alsa and everything else that is standard) and my DIY preamp. there is a serial (usb/ttl) link and the volume slider on linux now controls the rotary encoder (sort of) on my preamp; and vice versa. the vol control happens in analog (using cirrus 3318 chip) but is controlled over linux. ie, controlled over wifi pad or phone and needs no special app, since it ties into the system vol slider on the mpd server side.

mpd is the key. a nice center of your computer audio distributed (and that's the magic) system.
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote
Old 27th November 2012, 04:55 AM   #13
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Quote:
Originally Posted by linuxworks View Post
what I also have going (which is pretty custom) is a link between the volume control slider on mpd (and alsa and everything else that is standard) and my DIY preamp. there is a serial (usb/ttl) link and the volume slider on linux now controls the rotary encoder (sort of) on my preamp; and vice versa. the vol control happens in analog (using cirrus 3318 chip) but is controlled over linux.
Very nice, please could you post a bit more detail? Do you use a custom alsa-lib plugin providing the softvol capability, or something else?
  Reply With Quote
Old 27th November 2012, 02:52 PM   #14
diyAudio Member
 
Join Date: Jul 2008
Location: santa clara, CA
I will post the code once its ready. the idea is kind of simple and a bit of a hack, but the end result sure is worth it, to me.

you create a 'fake' slider or mixer entry in alsa. a few ascii lines in /etc/asound.conf and some in /var/lib/alsa/asound.state. the state file is what you have to edit to create a new 'Master' fader. even though its not real, it does show up as an entry in alsa and any sound app can 'move' it since its just a regular vol slider, to it.

the best way to work this is to use a usb sound card or one that is bit perfect and does not *change* any data when even a so-called Master slider is moved. all my usb/spdif dongles are like this (if you use the digital out instead of the analog out).

that's the slider part. the back-end part is a poller I wrote that checks /dev/ttyUSB0 for any new i/o and also checks the mixer app by calling a hacked version of linux 'amixer'. I call amixer to get the current value (in shell script) and if the value changed since last time, I send a serial update to my preamp (over usb). if no value was changed in the mixer, the poller scans the serial/usb port for *preamp* knob changes. if the user turned the knob, a new value will be seen and that gets pushed back to the mixer 'amixer' and the vol display on the computer is now updated and in sync. that's the general idea: keep polling both and if one changed, update the other. even in bash shell script, it keeps up fast enough to be useful.

the hard part for most is not all this: but the real world interface to your audio system, for real world vol control. I designed and built my own preamp and a feature that was always part of the design was 'remote remote control' over some kind of serial port.

cs3318 and arduino

the code is partially in bash and partially in C. will post (probably in another diyaudio thread) on how to do it, at least up to the serial port part.

last section of asound.state that you have to add:

Code:
        control.4 {
                iface MIXER
                name 'Tone Control - Treble'
                value 0
                comment {
                        access 'read write'
                        type INTEGER
                        count 1
                        range '0 - 3'
                }
        }
        control.5 {
                comment.access 'read write user'
                comment.type INTEGER
                comment.count 2
                comment.range '0 - 255'
                comment.tlv '0000000100000008ffffec1400000014'
                comment.dbmin -5100
                comment.dbmax 0
                iface MIXER
                name Master
                value.0 179
                value.1 179
        }
control.5 is the entry I had to add by hand. it has to have the magic name "Master" and 'iface MIXER'. find the last entry in your file (mine was #4) then add this control entry with one higher than the last entry. save the file (and save it under a new name, too, so that you can copy it over the /var/lib/alsa/asound.state at system startup time).

to get it to 'work' you have to have alsa reread its state file (usually it creates a state file, but here you created a new fake entry to an existing state file):

Code:
alsactl restore 1
depending on your card # it could be 'restore 1' or 'restore 2', etc.

once you do that, you should be able to run alsamixer (the image/capture I posted) and see the NEW 'Master' there. if you run alsamixer first and don't see it, then edit the file, do the alsactl restore, then you see it, you know things went well

in mpd, you should point to the Master mixer if you use mpd:

Code:
audio_output {
        type            "alsa"
        name            "USB"
        device          "hw:1,0"
        mixer_type      "hardware"
        mixer_control   "Master"
}
mixer_type 'hardware' means you do NOT use software vol control (so that you don't touch the bitstream). what we've done is to fake out the system and make it think that there is a real hardware control called Master and to link it with mpd.

go into mpd, vary its volume and in another window, watch alsamixer. the two controls should 'move each other' being the same widget accessed via different apps.
Attached Images
File Type: gif alsa1.gif (13.5 KB, 115 views)
__________________
My Photostream:http://www.flickr.com/photos/linux-works/

Last edited by linuxworks; 27th November 2012 at 03:00 PM.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote control Passive Volume Control with Display ua100k Swap Meet 2 31st May 2011 03:01 PM
Remote volume control for existing remote? theAnonymous1 Parts 7 6th August 2007 08:22 AM
Connecting receiver's remote control out to computer bobo1on1 Digital Source 0 29th May 2006 02:02 PM
remote control motorised control for volume pot/knob CharlesY Parts 0 25th July 2005 11:12 AM


New To Site? Need Help?

All times are GMT. The time now is 05:36 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2