Moode Forum

Full Version: Line input
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'd like to be able to select an analog audio source with line input. Should be possible ?

/Robert
It can be done within moOde via "Source select" config but only for Hifiberry DAC+ADC (Analog in) or Audiophonics 9028/9038 DAC (S/PDIF in) boards. These are the only 2 boards that have been integrated into the Source select feature.

Other boards that have switchable input would need to be controlled via command line for example by using amixer, alsamixer , etc commands or via manufacturer supplied utilities.
Ok, I have the AudioInjector Stereo (I2S board). Is it hard to integrate it into Source select feature?
Takes non-trivial amount of work and testing because these boards all use different mechanisms to control input switching for example the Hifiberry board uses alsaloop while the Audiophonics board uses custom driver commands. This is why there are only two supported boards.
Could the same be achieved in a more hardware independent way with MPD? https://mpd.readthedocs.io/en/latest/plu...ut-plugins
Haha, by doing "mpc add alsa://hw:0,0" on cmd line, that "track" shows up in Moode and I can stream line input through mpd and my ladspa plugin! The latency is terrible though...
The boards I mentioned earlier perform input switching, audio routing and conversion using mechanisms that are external to MPD for example the DAC+ADC has an on-board ADC chip. These boards are handled in moOde similar to the audio renderers like Airplay in that MPD is stopped and then the input source audio (renderer) starts playing. The only difference is that a pre-amp volume control is provided which controls the boards hardware volume controller.

[attachment=2408] [attachment=2407] [attachment=2405] [attachment=2406]
I found that the "Audio In" functionality is pretty much embedded in the webgui code, so it is not straightforward to add support for other cards. I'm willing to try to contribute to making "Audio In" functionality as an interface, where support for a new card requires just to implement a AudioIn interface. Not sure it is feasible... Smile
The challenge is that there is no standard API for switching inputs on a given device for example Hifiberry DAC+ADC uses ALSA Loopback and alsaloop command while Audiophonics 9028/9038 DAC uses amixer (I2C) commands.
That is why it should be as an "interface" that Moode uses. Each card implements the switching as it needs to.
Pages: 1 2