Motivation
The Fire TV outputs the audio signal along to the video signal over
HDMI by default. Therefore, if a display is used which does not support
audio over HDMI, such as a computer monitor, there won't be any sound.
On the other hand, the Fire TV box offers a USB port which can be used
for external audio devices, such as speakers or head phones. Luckily, the
Android based software which runs on the Fire TV (Fire OS) supports
audio output via USB, but with a snag: The is no user interface for volume
control.
The default output of digital audio via HDMI does not need (or support?) any
volume control, respectively mixing.
Description
There is one script listen_fireremote.sh which listens for Fire TV Remote
events. Button presses of UP or DOWN while holding the MENU button
increases or decreases the volume.
Another script listen_soundbar.sh listens for wheel events of the
Dell AC511 SoundBar in order to increase or decrease the volume.
Currently, volume control is supported for USB audio devices only.
HDMI is not supported because I do not have access to an HDMI
receiver with audio support for testing.
This volume control is carried out on a rather low level of the system and
is expected to work everywhere, across all apps.
Requirements
* a rooted Fire TV
* Script Manager - SManager app
Disclaimer
As usual, please be careful: these scripts run as root with nearly maximum
privileges and thus might break your Fire TV! They work for me but
might fail elsewhere. Make sure to review the code before running it.
Installation
1. Get the latest release package: http://ift.tt/22n5guT
2. Extract it to a path somewhere in /data/media/0 on your Fire TV box.
3. Set up one or both of the event listening scripts to be started at boot
time with superuser permissions as shown below:
(screenshots of a German Fire TV localization)
Implementation
The underlying Android system is based on a minimal Linux which
supports audio mixing via the tinyALSA tools.
Specifically on Android, tinymix can be used for this purpose.
The script collection at hand uses the tinymix program to find an audio
device which provides a linear playback volume mixer control.
Additionally, it sets up a background process querying the getevent builtin
command for certain user input events, for example from the Fire TV Remote or
another USB device.
This in turn, is used to control the initially determined playback volume via
tinymix.
Providing an arbitrary argument to the listener scripts listen_fireremote.sh
or listen_soundbar.sh keeps them in the foreground and outputs debug
information for each input event. Otherwise, during normal operation a log file
is created in the log subdirectory of the scripts directory: firesound/log.
Licensing: GPLv3.
from xda-developers http://ift.tt/1qHXqRd
via
IFTTT