fulup-bzh / AlsaJsonGateway

HTTP REST/JSON Gateway to ALSA mixer service for HTML5 UI
53 stars 5 forks source link

alsa-json-gateway

Provides an HTTP REST interface to ALSA mixer for HTML5 UI support. The main objective of AJG is to decouple ALSA from UI, this especially for Music Oriented Sound boards like Scarlett Focurite and others.

Alpha-01 release.

Supported features

*Supports every ALSA/Mixer controls base on 'amixer' capabilities.

Building [Linux Only]

1) download and expend alsa-json-gateway archive from github

2) install dependencies [should be available in any distributions, eventually under different names]
   a: alsa-dev
   b: libmicrohttpd-dev
   c: json-c-dev

   * Centos/Redhat/Fedora:  sudo yum install libtool pkgconfig json-c-devel libmicrohttpd-devel alsa-lib-devel
   * OpenSuse:              sudo zypper install libtool pkg-config libjson-c-devel libmicrohttpd-devel alsa-lib-devel
   * Ubuntu/Mint/Debian:    sudo apt-get install libtool pkg-config libjson-c-dev libmicrohttpd-dev libasound2-dev

3) autoreconf --install; ./configure; make; sudo make install;   # Alpha version does not have installation process.

Kernel version dependencies.

Starting alsa-json-gateway

  export AJW_DIR=$HOME/AJW; mkdir $AJW_DIR
  ajg-daemon --help                                                        # get options
  ajg-daemon --rootdir=$AJW_DIR --verbose --port=1234                      # run foreground in verbose mode
  ajg-daemon --config=$AJW_DIR/AJG-config.json --rootdir=AJW_DIR  --save   # run save config
  ajg-daemon --config=AJW_DIR/AJG-config.json  --daemon                    # run in background mode
  ajg-daemon --config=AJW_DIR/AJG-config.json  --kill                      # kill current AJG daemon
  ajg-daemon --config=AJW_DIR/AJG-config.json  --fakemod                   # simulate sndcard ignoring set/get control

  ajg-daemon --rootdir=/opt/ajg-daemon/www --sessiondir=$HOME/.ajg --daemon # default background mode

REST API

WARNING remarks:

Missing Features :