mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
Trying to add driver to output
This commit is contained in:
parent
2a7b3976cd
commit
8284050b51
16
inxi
16
inxi
|
@ -990,7 +990,7 @@ set_calculated_variables()
|
|||
## create array of sound cards installed on system, and if found, use asound data as well
|
||||
get_audio_data()
|
||||
{
|
||||
local i='' alsa_index=0
|
||||
local i='' alsa_index=0 alsa_driver=''
|
||||
|
||||
IFS=$'\n'
|
||||
A_AUDIO_DATA=( $( echo "$lspci_data" | gawk -F': ' '
|
||||
|
@ -1020,7 +1020,14 @@ get_audio_data()
|
|||
# now we'll add in the alsa data if the file exists
|
||||
alsa_index=${#A_AUDIO_DATA[@]}
|
||||
if [[ -e /proc/asound/version ]];then
|
||||
A_AUDIO_DATA[$alsa_index]=$( gawk '{
|
||||
if [[ -f /proc/asound/cards ]];then
|
||||
alsa_driver=$( gawk -F 'with ' '{
|
||||
gsub(" at.*", "", $2)
|
||||
print $2
|
||||
}' /proc/asound/cards )
|
||||
fi
|
||||
echo alsa_driver $alsa_driver
|
||||
A_AUDIO_DATA[$alsa_index]=$( gawk -v alsaDriver="$alsa_driver" '{
|
||||
{ IGNORECASE=1 }
|
||||
# some alsa strings have the build date in (...)
|
||||
# also remove trailing .
|
||||
|
@ -1028,8 +1035,11 @@ get_audio_data()
|
|||
gsub(/,/, " ", $0)
|
||||
gsub(/^ +| +$/, "", $0)
|
||||
gsub(/ [ \t]+/, " ", $0)
|
||||
if ( alsaDriver != "" ){
|
||||
alsaDriver=","alsaDriver
|
||||
}
|
||||
if ( $0 != "" ){
|
||||
print $0 ",alsa"
|
||||
print $0 ",alsa"alsaDriver
|
||||
}
|
||||
}' /proc/asound/version )
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue