mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 17:07:49 +00:00
tweak
This commit is contained in:
parent
cd5cb1e814
commit
b43667f58f
18
inxi
18
inxi
|
@ -1265,7 +1265,6 @@ get_cmdline()
|
||||||
get_audio_data()
|
get_audio_data()
|
||||||
{
|
{
|
||||||
local i='' alsa_data='' alsa_driver='' device_count='' usb_proc_file=''
|
local i='' alsa_data='' alsa_driver='' device_count='' usb_proc_file=''
|
||||||
local usb_data='' usb_data_id=''
|
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
# this first step handles the drivers for cases where the second step fails to find one
|
# this first step handles the drivers for cases where the second step fails to find one
|
||||||
|
@ -1387,19 +1386,12 @@ get_audio_data()
|
||||||
# also, find the contents of usbid in lsusb and print everything after the 7th word on the corresponding line
|
# also, find the contents of usbid in lsusb and print everything after the 7th word on the corresponding line
|
||||||
# finally, strip out commas as they will change the driver :)
|
# finally, strip out commas as they will change the driver :)
|
||||||
# lsusb is not contained in some users paths, hardcode it!
|
# lsusb is not contained in some users paths, hardcode it!
|
||||||
usb_data_id=$( cat $usb_proc_file/usbid )
|
A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" \
|
||||||
usb_data=$( lsusb -v 2>/dev/null | grep <<< $usb_data_id )
|
"$( lsusb -v 2>/dev/null |\
|
||||||
usb_data=$( sed 's/,/ /' <<< $usb_data ) # replace with gawk but use for now
|
grep $( cat $usb_proc_file/usbid ) |\
|
||||||
usb_data=$( gawk '{
|
gawk '{ for( i=7; i<NF; i++) { printf($i " ") } printf "\n" }' |\
|
||||||
for( i=7; i < NF; i++ ) {
|
sed "s/,/ /"),snd-usb-audio" )
|
||||||
printf($i " ")
|
|
||||||
}
|
|
||||||
printf "\n"
|
|
||||||
}' <<< $usb_data )
|
|
||||||
|
|
||||||
if [[ -n "$usb_data" ]];then
|
|
||||||
A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" "$usb_data,snd-usb-audio" )
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue