#!/bin/sh case $1 in devices) . /etc/init.d/rc.functions if [ -n "$(aplay -l 2>/dev/null)" ]; then test "$PASSTHROUGH_DEVICE" != "" && echo "$PASSTHROUGH_DEVICE" echo "-" LC_ALL=C aplay -l | grep "^card " | sed "s/card \([0-9]\+\): .*, device \([0-9]\+\).* \[\(.*\)\]/\1 \2 \3/" else aplay -l 2>&1 >/dev/null | sed "s/.*:/--/" fi ;; esac