by relghuar » Sat Mar 23, 2013 10:40 pm
$this->bbcode_second_pass_quote('stronnag', '')$this->bbcode_second_pass_quote('relghuar', 'I')'ve noticed the error messages related to this bug
https://bugs.freedesktop.org/show_bug.cgi?id=53036 and after I fixed them, pulseaudio looked to be running fine but the X server started crashing randomly. So, apparently there are still some unresolved issues with chromebook hardware
Can you please post the configuration changes that cause pulseaudio to at least run?
Well, one thing that makes pulseaudio working is to remove ucm configuration from /usr/share/alsa/ucm/DAISY-I2S, but that's probably not what you're looking for
As the aforementioned bug states, the problem are missing PlaybackChannels and CaptureChannels instructions in HiFi.conf, so I've added SectionDevice."Headphone".0 / Value / PlaybackChannels "2" and SectionDevice."Mic".0 / Value / CaptureChannels "1" - unfortunately this didn't only completely destabilized X server, but also disabled any volume/mute control. My custom amixer scripts stopped working and I couldn't get pulseaudio volume control to work whatever I tried. So in the end I just put original ucm configuration back
pulseaudio doesn't work, X doesn't crash and my shortcut-assigned custom volume control scripts work like a charm. Here it is, if anyone's interested:
$this->bbcode_second_pass_code('', '
#!/bin/bash
_dev="$1"
_act="$2"
_val1="$3"
_val2="$4"
if [ "$_dev" == "h" ] ; then
tgt=Headphone
elif [ "$_dev" == "s" ] ; then
tgt=Speaker
else
logger -i -s -t "volume" -p user.err "invalid target $_dev (allowed: h=headphone/s=speaker)"
exit
fi
if [ "$_act" == "mute" ] ; then
tname="$tgt Switch"
oval=`amixer cget name="$tname" | grep ": values=" | sed -e "s/[^=]*=[^,]*,//"`
if [ "$_val1" == "toggle" ] ; then
[ "$oval" == "on" ] && nval="off" || nval="on"
else
nval="$_val1"
fi
if [ "$nval" == "$oval" ] ; then
logger -i -s -t "volume" -p user.info "$tname already in $nval, ignoring"
exit
fi
amixer cset name="$tname" "$nval" >/dev/null
elif [ "$_act" == "vol" ] ; then
tname="$tgt Volume"
tdesc=`amixer cget name="$tname"`
oval=`echo "$tdesc" | grep ": values=" | sed -e "s/[^=]*=[^,]*,//"`
vmin=`echo "$tdesc" | grep ",min=" | sed -e "s/^.*,min=\([0-9]*\),.*$/\1/"`
vmax=`echo "$tdesc" | grep ",max=" | sed -e "s/^.*,max=\([0-9]*\),.*$/\1/"`
if [ "$_val1" == "inc" -o "$_val1" == "+" ] ; then
nval=$(($oval+$_val2))
elif [ "$_val1" == "dec" -o "$_val1" == "-" ] ; then
nval=$(($oval-$_val2))
else
nval=$_val1
fi
[ $nval -lt $vmin ] && nval=$vmin
[ $nval -gt $vmax ] && nval=$vmax
if [ $nval -eq $oval ] ; then
logger -i -s -t "volume" -p user.info "$tname is already $nval, ignoring"
exit
fi
amixer cset name="$tname" "$nval" >/dev/null
else
logger -i -s -t "volume" -p user.warn "No valid action found in $@"
fi
')
Usage: volume.sh [s|h] [[mute [on|off|toggle]]|[vol [+|-] <value>]]
Current key assignments (with Super_L remapped on search key):
$this->bbcode_second_pass_code('', '
<property name="<Super>F6" type="string" value="/usr/local/bin/brightness.sh - 50"/>
<property name="<Super>F7" type="string" value="/usr/local/bin/brightness.sh + 50"/>
<property name="<Shift><Super>F8" type="string" value="sudo /usr/local/bin/volume.sh s mute toggle"/>
<property name="<Shift><Super>F9" type="string" value="sudo /usr/local/bin/volume.sh s vol - 2"/>
<property name="<Shift><Super>F10" type="string" value="sudo /usr/local/bin/volume.sh s vol + 2"/>
<property name="<Super>F8" type="string" value="sudo /usr/local/bin/volume.sh h mute toggle"/>
<property name="<Super>F9" type="string" value="sudo /usr/local/bin/volume.sh h vol - 2"/>
<property name="<Super>F10" type="string" value="sudo /usr/local/bin/volume.sh h vol + 2"/>
')
The only downside is I have to control headphones and speaker separately, but I can live with that for now... there'd also be a problem with HDMI audio, but that's pretty much useless until we get really working armsoc driver, anyway.
Regards,
rel
UPDATE: well, screw it. My X server just crashed with original ucm configuration. Most likely some recent update to fbdev or cyapa drivers, or perhaps even kernel itself broke something. Not nice.