From 7f8b169f280f1335fd31404820e7bffa9e557c40 Mon Sep 17 00:00:00 2001 From: 8nlight <8nlight@disroot.org> Date: Thu, 30 Nov 2023 14:53:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asoundrc | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ audio_vis.sh | 4 ++++ 2 files changed, 66 insertions(+) create mode 100644 asoundrc create mode 100644 audio_vis.sh diff --git a/asoundrc b/asoundrc new file mode 100644 index 0000000..d7ca45a --- /dev/null +++ b/asoundrc @@ -0,0 +1,62 @@ +pcm.MAUDIO { + type hw + card rockchipes8316c + device 0 + subdevice 0 + nonblock true +} + +ctl.MAUDIO { + type hw + card rockchipes8316c + buffer_size 10000 + period_size 8192 +} + +pcm.loopin { + type plug + slave.pcm "hw:Loopback,0,0" +} + +pcm.loopout { + type plug + slave.pcm "hw:Loopback,1,0" +} + +pcm.multi { + type route; + slave.pcm { + type multi; + slaves.a.pcm "MAUDIO"; + slaves.b.pcm "loopin"; + slaves.a.channels 2; + slaves.b.channels 2; + bindings.0.slave a; + bindings.0.channel 0; + bindings.1.slave a; + bindings.1.channel 1; + bindings.2.slave b; + bindings.2.channel 0; + bindings.3.slave b; + bindings.3.channel 1; + } + + ttable.0.0 1; + ttable.1.1 1; + ttable.0.2 1; + ttable.1.3 1; +} + +pcm.pbnrec { + type plug + slave.pcm "multi" + hint { + show on + description "Alsa Playback & Record" + } +} + +pcm.!default { + type plug + slave.pcm "pbnrec" +} diff --git a/audio_vis.sh b/audio_vis.sh new file mode 100644 index 0000000..9418577 --- /dev/null +++ b/audio_vis.sh @@ -0,0 +1,4 @@ +#!/bin/ash +clear +arecord -q --period-size=50 --buffer-size=150 -r 4000 --disable-softvol -f U8 -t raw -D loopout | hexdump -e '"%02o\n"' | tr -d '*' | xargs -n 50 -r ./micro-utils/bin/spark -n -r +