diff --git a/inxi b/inxi index 9ca25fd..0fecf70 100755 --- a/inxi +++ b/inxi @@ -1942,8 +1942,8 @@ print_audio_data() { local i='' card_one='Card-1 ' audio_data='' a_audio_data='' port_data='' local a_audio_working='' alsa_driver='' alsa_data='' - # set A_AUDIO_DATA - # and get als + + # set A_AUDIO_DATA and get alsa data get_audio_data alsa_data=$( get_audio_alsa_data ) IFS="," @@ -1952,7 +1952,7 @@ print_audio_data() if [[ -n ${A_AUDIO_DATA[@]} ]];then # slightly complicated because 2nd array item could be the alsa data - if [[ ${#A_AUDIO_DATA[@]} -le 1 ]] || [[ ${#A_AUDIO_DATA[@]} -eq 2 && -n $( grep ',alsa' <<< ${A_AUDIO_DATA[@]} ) ]];then + if [[ ${#A_AUDIO_DATA[@]} -le 1 ]];then card_one='Card ' fi @@ -1960,7 +1960,7 @@ print_audio_data() # 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 + if [[ -n ${a_audio_working[1]} ]];then alsa_driver=" ${C1}driver${C2} ${a_audio_working[1]}" fi audio_data="${C1}$card_one${C2}${a_audio_working[0]}$alsa_driver$port_data" @@ -1978,10 +1978,10 @@ print_audio_data() # 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 - if [[ -n ${a_audio_working[1]} && ${a_audio_working[1]} != 'alsa' ]];then + if [[ -n ${a_audio_working[1]} ]];then alsa_driver="${C1}driver${C2} ${a_audio_working[1]}" fi - if [[ -n ${a_audio_working[1]} && ${a_audio_working[1]} != 'alsa' ]];then + if [[ -n ${a_audio_working[0]} ]];then audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data" fi if [[ -n $audio_data ]];then