38 lines
627 B
Bash
38 lines
627 B
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
. /etc/profile
|
|
|
|
### Set a custom device so we don't clobber it.
|
|
set-audio set "CUSTOM (UNMANAGED)"
|
|
set-audio esset "Master"
|
|
|
|
cat <<EOF >/storage/.config/asound.conf
|
|
pcm.!default {
|
|
type plug
|
|
slave.pcm "dmixer"
|
|
}
|
|
|
|
pcm.dmixer {
|
|
type dmix
|
|
ipc_key 1024
|
|
slave {
|
|
pcm "hw:0,0"
|
|
period_time 0
|
|
period_size 1024
|
|
buffer_size 4096
|
|
rate 44100
|
|
}
|
|
bindings {
|
|
0 0
|
|
1 1
|
|
}
|
|
}
|
|
EOF
|
|
|
|
#if [ ! -e "/storage/.config/asound.state" ]
|
|
#then
|
|
# cat <<EOF >/storage/.config/asound.state
|
|
#EOF
|
|
#fi
|