patch for usb audio output tweak, patch for possible bug in usb audio function.

This commit is contained in:
inxi-svn 2011-06-23 01:25:35 +00:00
parent c805ecd0f0
commit bdf795a8fc

11
inxi
View file

@ -3,7 +3,7 @@
#### Script Name: inxi
#### version: 1.7.8
#### Date: June 22 2011
#### Patch Number: 00
#### Patch Number: 01
########################################################################
#### SPECIAL THANKS
########################################################################
@ -2714,7 +2714,9 @@ get_audio_usb_data()
IFS=$'\n'
lsusb_path=$( type -p lsusb )
if [[ -n $lsusb_path ]];then
lsusb_data=$( $lsusb_path -v 2>/dev/null )
fi
log_function_data 'raw' "usb_data:\n$lsusb_data"
if [[ -n $lsusb_data ]];then
# for every sound card symlink in /proc/asound - display information about it
@ -2742,12 +2744,12 @@ get_audio_usb_data()
separator = " "
}
if ( $6 != "" ){
print string ",snd-usb-audio,,," $6
print string ",USB Audio,,," $6
}
}' <<< "$usb_data" )
fi
# this method is interesting, it shouldn't work but it does
#A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" "$usb_data,snd-usb-audio,," )
#A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" "$usb_data,USB Audio,," )
# but until we learn why the above worked, I'm using this one, which is safer
if [[ -n $usb_data ]];then
array_count=${#A_AUDIO_DATA[@]}
@ -4412,7 +4414,6 @@ get_networking_usb_data()
if [[ -n $lsusb_path ]]; then
# send error messages of lsusb to /dev/null as it will display a bunch if not a super user
lsusb_data="$( $lsusb_path 2>/dev/null )"
# set spaces to |
USB_NETWORK_SEARCH=$( sed 's/[[:space:]]\+/|/g' <<< $USB_NETWORK_SEARCH )
# also, find the contents of usbid in lsusb and print everything after the 7th word on the
@ -6065,7 +6066,7 @@ print_audio_data()
port_data=" ${C1}port$port_plural${C2} ${a_audio_working[2]}"
fi
if [[ -n ${a_audio_working[4]} && $B_EXTRA_DATA == 'true' ]];then
if [[ ${a_audio_working[1]} != 'snd-usb-audio' ]];then
if [[ ${a_audio_working[1]} != 'USB Audio' ]];then
bus_usb_text='bus-ID'
else
bus_usb_text='usb-ID'