mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +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()
|
||||
{
|
||||
local i='' alsa_data='' alsa_driver='' device_count='' usb_proc_file=''
|
||||
local usb_data='' usb_data_id=''
|
||||
|
||||
IFS=$'\n'
|
||||
# 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
|
||||
# finally, strip out commas as they will change the driver :)
|
||||
# lsusb is not contained in some users paths, hardcode it!
|
||||
usb_data_id=$( cat $usb_proc_file/usbid )
|
||||
usb_data=$( lsusb -v 2>/dev/null | grep <<< $usb_data_id )
|
||||
usb_data=$( sed 's/,/ /' <<< $usb_data ) # replace with gawk but use for now
|
||||
usb_data=$( gawk '{
|
||||
for( i=7; i < NF; i++ ) {
|
||||
printf($i " ")
|
||||
}
|
||||
printf "\n"
|
||||
}' <<< $usb_data )
|
||||
A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" \
|
||||
"$( lsusb -v 2>/dev/null |\
|
||||
grep $( cat $usb_proc_file/usbid ) |\
|
||||
gawk '{ for( i=7; i<NF; i++) { printf($i " ") } printf "\n" }' |\
|
||||
sed "s/,/ /"),snd-usb-audio" )
|
||||
|
||||
if [[ -n "$usb_data" ]];then
|
||||
A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" "$usb_data,snd-usb-audio" )
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue