mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
patch for usb audio output tweak, patch for possible bug in usb audio function.
This commit is contained in:
parent
c805ecd0f0
commit
bdf795a8fc
11
inxi
11
inxi
|
@ -3,7 +3,7 @@
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.7.8
|
#### version: 1.7.8
|
||||||
#### Date: June 22 2011
|
#### Date: June 22 2011
|
||||||
#### Patch Number: 00
|
#### Patch Number: 01
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -2714,7 +2714,9 @@ get_audio_usb_data()
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
lsusb_path=$( type -p lsusb )
|
lsusb_path=$( type -p lsusb )
|
||||||
|
if [[ -n $lsusb_path ]];then
|
||||||
lsusb_data=$( $lsusb_path -v 2>/dev/null )
|
lsusb_data=$( $lsusb_path -v 2>/dev/null )
|
||||||
|
fi
|
||||||
log_function_data 'raw' "usb_data:\n$lsusb_data"
|
log_function_data 'raw' "usb_data:\n$lsusb_data"
|
||||||
if [[ -n $lsusb_data ]];then
|
if [[ -n $lsusb_data ]];then
|
||||||
# for every sound card symlink in /proc/asound - display information about it
|
# for every sound card symlink in /proc/asound - display information about it
|
||||||
|
@ -2742,12 +2744,12 @@ get_audio_usb_data()
|
||||||
separator = " "
|
separator = " "
|
||||||
}
|
}
|
||||||
if ( $6 != "" ){
|
if ( $6 != "" ){
|
||||||
print string ",snd-usb-audio,,," $6
|
print string ",USB Audio,,," $6
|
||||||
}
|
}
|
||||||
}' <<< "$usb_data" )
|
}' <<< "$usb_data" )
|
||||||
fi
|
fi
|
||||||
# this method is interesting, it shouldn't work but it does
|
# 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
|
# but until we learn why the above worked, I'm using this one, which is safer
|
||||||
if [[ -n $usb_data ]];then
|
if [[ -n $usb_data ]];then
|
||||||
array_count=${#A_AUDIO_DATA[@]}
|
array_count=${#A_AUDIO_DATA[@]}
|
||||||
|
@ -4412,7 +4414,6 @@ get_networking_usb_data()
|
||||||
if [[ -n $lsusb_path ]]; then
|
if [[ -n $lsusb_path ]]; then
|
||||||
# send error messages of lsusb to /dev/null as it will display a bunch if not a super user
|
# 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 )"
|
lsusb_data="$( $lsusb_path 2>/dev/null )"
|
||||||
|
|
||||||
# set spaces to |
|
# set spaces to |
|
||||||
USB_NETWORK_SEARCH=$( sed 's/[[:space:]]\+/|/g' <<< $USB_NETWORK_SEARCH )
|
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
|
# 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]}"
|
port_data=" ${C1}port$port_plural${C2} ${a_audio_working[2]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
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'
|
bus_usb_text='bus-ID'
|
||||||
else
|
else
|
||||||
bus_usb_text='usb-ID'
|
bus_usb_text='usb-ID'
|
||||||
|
|
Loading…
Reference in a new issue