mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
more tests, safeguards
This commit is contained in:
parent
14746d68f1
commit
b79da13099
13
inxi
13
inxi
|
@ -1936,6 +1936,7 @@ print_audio_data()
|
|||
# if [[ -n ${a_audio_working[2]} ]];then
|
||||
# port_data=" ${C1}at port${C2} ${a_audio_working[2]}"
|
||||
# fi
|
||||
# this should only trigger if the /proc/asound/cards data is used, not lspci -nn
|
||||
if [[ -n ${a_audio_working[1]} && ${a_audio_working[1]} != 'alsa' ]];then
|
||||
alsa_driver=" ${C1}driver${C2} ${a_audio_working[1]}"
|
||||
fi
|
||||
|
@ -1953,17 +1954,19 @@ print_audio_data()
|
|||
# if [[ ${a_audio_working[2]} == 'port' ]];then
|
||||
# port_data=" ${C1}at port${C2} ${a_audio_working[2]}"
|
||||
# fi
|
||||
# we're testing for the presence of the 2nd array item here
|
||||
# we're testing for the presence of the 2nd array item here, which is the driver name
|
||||
if [[ -n ${a_audio_working[1]} && ${a_audio_working[1]} != 'alsa' ]];then
|
||||
alsa_driver="${C1}driver${C2} ${a_audio_working[1]}"
|
||||
fi
|
||||
if [[ ${a_audio_working[1]} != 'alsa' ]];then
|
||||
if [[ -n ${a_audio_working[1]} && ${a_audio_working[1]} != 'alsa' ]];then
|
||||
audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
||||
else
|
||||
elif [[ -n ${a_audio_working[1]} && ${a_audio_working[1]} == 'alsa' ]];then
|
||||
audio_data="${C1}Sound: ${C2}${a_audio_working[0]}"
|
||||
fi
|
||||
audio_data=$( create_print_line " " "$audio_data" )
|
||||
print_screen_output "$audio_data"
|
||||
if [[ -n $audio_data ]];then
|
||||
audio_data=$( create_print_line " " "$audio_data" )
|
||||
print_screen_output "$audio_data"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue