diff --git a/inxi b/inxi index f96cd25..845d7e5 100755 --- a/inxi +++ b/inxi @@ -1933,13 +1933,11 @@ print_audio_data() card_one='Card ' fi - if [[ -n ${a_audio_working[2]} ]];then - port_data=" ${C1}at port${C2} ${a_audio_working[2]}" - fi - if [[ ${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[2]} ]];then +# port_data=" ${C1}at port${C2} ${a_audio_working[2]}" +# fi + if [[ -n ${a_audio_working[1]} && ${a_audio_working[1]} != 'alsa' ]];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" audio_data=$( create_print_line "Audio:" "$audio_data" ) @@ -1950,16 +1948,16 @@ print_audio_data() IFS="," a_audio_working=( ${A_AUDIO_DATA[i]} ) IFS="$ORIGINAL_IFS" - port_data='' +# port_data='' alsa_driver='' - if [[ ${a_audio_working[1]} == 'port' ]];then - port_data=" ${C1}at port${C2} ${a_audio_working[2]}" - fi +# 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 + 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]} ]];then - alsa_driver="${C2}driver:${a_audio_working[1]}" - fi audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data" else audio_data="${C1}Sound: ${C2}${a_audio_working[0]}"