mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
more testing
This commit is contained in:
parent
f01fd145ca
commit
892572ec7f
21
inxi
21
inxi
|
@ -1066,7 +1066,7 @@ get_audio_data()
|
||||||
else {
|
else {
|
||||||
a[j]=i
|
a[j]=i
|
||||||
# little trick here to try to catch the driver if there is
|
# little trick here to try to catch the driver if there is
|
||||||
# only one card
|
# only one card and it was null, from the first function
|
||||||
if (drivers[i] != "") {
|
if (drivers[i] != "") {
|
||||||
useDrivers=drivers[i]
|
useDrivers=drivers[i]
|
||||||
}
|
}
|
||||||
|
@ -2179,7 +2179,7 @@ print_short_data()
|
||||||
print_audio_data()
|
print_audio_data()
|
||||||
{
|
{
|
||||||
local i='' card_one='Card-1 ' audio_data='' a_audio_data='' port_data=''
|
local i='' card_one='Card-1 ' audio_data='' a_audio_data='' port_data=''
|
||||||
local a_audio_working='' alsa_driver='' alsa_data=''
|
local a_audio_working='' alsa_driver='' alsa_data='' port_plural=''
|
||||||
# set A_AUDIO_DATA and get alsa data
|
# set A_AUDIO_DATA and get alsa data
|
||||||
get_audio_data
|
get_audio_data
|
||||||
alsa_data=$( get_audio_alsa_data )
|
alsa_data=$( get_audio_alsa_data )
|
||||||
|
@ -2201,7 +2201,10 @@ print_audio_data()
|
||||||
alsa_driver=" ${C1}driver${C2} ${a_audio_working[1]}"
|
alsa_driver=" ${C1}driver${C2} ${a_audio_working[1]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[2]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_audio_working[2]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
port_data="${C1}at port${C2} ${a_audio_working[2]}"
|
if [[ $( wc -w <<< ${a_audio_working[2]} ) -gt 1 ]];then
|
||||||
|
port_plural='s'
|
||||||
|
fi
|
||||||
|
port_data="${C1}at port$port_plural${C2} ${a_audio_working[2]}"
|
||||||
fi
|
fi
|
||||||
audio_data="${C1}$card_one${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
audio_data="${C1}$card_one${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
||||||
audio_data=$( create_print_line "Audio:" "$audio_data" )
|
audio_data=$( create_print_line "Audio:" "$audio_data" )
|
||||||
|
@ -2212,17 +2215,19 @@ print_audio_data()
|
||||||
IFS=","
|
IFS=","
|
||||||
a_audio_working=( ${A_AUDIO_DATA[i]} )
|
a_audio_working=( ${A_AUDIO_DATA[i]} )
|
||||||
IFS="$ORIGINAL_IFS"
|
IFS="$ORIGINAL_IFS"
|
||||||
# port_data=''
|
port_data=''
|
||||||
alsa_driver=''
|
alsa_driver=''
|
||||||
# if [[ ${a_audio_working[2]} == 'port' ]];then
|
port_plural=''
|
||||||
# port_data=" ${C1}at port${C2} ${a_audio_working[2]}"
|
|
||||||
# fi
|
|
||||||
# we're testing for the presence of the 2nd array item here, which is the driver name
|
# we're testing for the presence of the 2nd array item here, which is the driver name
|
||||||
if [[ -n ${a_audio_working[1]} ]];then
|
if [[ -n ${a_audio_working[1]} ]];then
|
||||||
alsa_driver="${C1}driver${C2} ${a_audio_working[1]}"
|
alsa_driver="${C1}driver${C2} ${a_audio_working[1]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[2]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_audio_working[2]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
port_data="${C1}at port${C2} ${a_audio_working[2]}"
|
if [[ $( wc -w <<< ${a_audio_working[2]} ) -gt 1 ]];then
|
||||||
|
port_plural='s'
|
||||||
|
fi
|
||||||
|
port_data="${C1}at port$port_plural${C2} ${a_audio_working[2]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[0]} ]];then
|
if [[ -n ${a_audio_working[0]} ]];then
|
||||||
audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
||||||
|
|
Loading…
Reference in a new issue