Skip to content

Commit

Permalink
xiaomi lumi: Update alsa configs
Browse files Browse the repository at this point in the history
  • Loading branch information
devbis committed Feb 1, 2021
1 parent 008bc77 commit 44db74a
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 2 deletions.
40 changes: 38 additions & 2 deletions files_xiaomi_lumi/etc/asound.conf
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ format S16_LE
rate 8000
}
}
pcm.downmix {
type route
slave.pcm "asymed"
slave.channels 2
ttable {
0.0 1
0.1 1
1.0 1
1.1 1
}
}

pcm.asymed{
type asym
Expand All @@ -247,18 +258,43 @@ slave.pcm "asymed"

pcm.softvol {
type softvol
slave.pcm "asymed"
slave.pcm "downmix"
control {
name "Master"
card 0
}
}

pcm.softvol2 {
type softvol
slave.pcm "downmix"
control {
name "AlertVol"
card 0
}
}
pcm.softvol3 {
type softvol
slave.pcm "downmix"
control {
name "SnapVol"
card 0
}
}
pcm.alert{
type plug
route_policy "average"
slave.pcm "softvol2"
}
pcm.!default{
type plug
route_policy "average"
slave.pcm "softvol"
}
pcm.mix{
type plug
route_policy "average"
slave.pcm "softvol3"
}

ctl.!default{
type hw
Expand Down
53 changes: 53 additions & 0 deletions files_xiaomi_lumi/etc/asound.state
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
state.tfa9882audio {
control.1 {
iface MIXER
name AlertVol
value.0 82
value.1 82
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '0000000100000008ffffec1400000014'
dbmin -5100
dbmax 0
dbvalue.0 -3460
dbvalue.1 -3460
}
}
control.2 {
iface MIXER
name Master
value.0 39
value.1 39
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '0000000100000008ffffec1400000014'
dbmin -5100
dbmax 0
dbvalue.0 -4320
dbvalue.1 -4320
}
}
control.3 {
iface MIXER
name SnapVol
value.0 129
value.1 129
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '0000000100000008ffffec1400000014'
dbmin -5100
dbmax 0
dbvalue.0 -2520
dbvalue.1 -2520
}
}
}
4 changes: 4 additions & 0 deletions files_xiaomi_lumi/etc/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ echo 2 >/proc/sys/kernel/printk
echo -e "\033[9;0]" > /dev/tty0
echo 0 > /sys/bus/platform/drivers/imx_busfreq/soc\:busfreq/enable

if [ -f /etc/asound.state ]; then
/usr/sbin/alsactl -f /etc/asound.state restore
fi

exit 0

0 comments on commit 44db74a

Please sign in to comment.