mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
Improved audio device detection with new string
This commit is contained in:
parent
582c6eecac
commit
99509242d1
57
inxi
57
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.3.19
|
||||
#### version: 0.3.20
|
||||
#### Date: November 4 2008
|
||||
########################################################################
|
||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||
|
@ -748,7 +748,7 @@ get_audio_data()
|
|||
IFS=$'\n'
|
||||
A_AUDIO_DATA=( $( echo "$lspci_data" | gawk -F': ' '
|
||||
{ IGNORECASE=1 }
|
||||
/multimedia audio controller/ { print $NF }' ) )
|
||||
/multimedia audio controller|audio device/ { print $NF }' ) )
|
||||
IFS="$ORIGINAL_IFS"
|
||||
for (( i=0; i < ${#A_AUDIO_DATA[@]}; i++ ))
|
||||
do
|
||||
|
@ -816,10 +816,14 @@ get_cpu_data()
|
|||
min = $NF
|
||||
}
|
||||
else {
|
||||
if ($NF < min) { min = $NF }
|
||||
if ($NF < min) {
|
||||
min = $NF
|
||||
}
|
||||
}
|
||||
|
||||
if ($NF > max) { max = $NF }
|
||||
if ($NF > max) {
|
||||
max = $NF
|
||||
}
|
||||
gsub(/MHZ/,"",$NF) ## clears out for cell cpu
|
||||
gsub(/.000000/,".00",$NF) ## clears out for cell cpu
|
||||
cpu[nr, "speed"] = $NF
|
||||
|
@ -869,31 +873,6 @@ get_cpu_data()
|
|||
fi
|
||||
done
|
||||
done
|
||||
## not using this now, replaced by new get_core_count, but if we need this in the future
|
||||
## it will be in modules/legacy, for now leaving it here
|
||||
# test for multi core cpu present
|
||||
# multi_cpu=$( grep -i 'dual\|triple\|quad' <<< "${A_CPU_DATA[@]}" )
|
||||
# if [ -n "$multi_cpu" ];then
|
||||
# NO_CPU_COUNT=1
|
||||
# else
|
||||
# case $(( ${#A_CPU_DATA[@]}-1 )) in
|
||||
# 2)
|
||||
# CPU2="Dual"
|
||||
# ;;
|
||||
# 3)
|
||||
# CPU2="Triple"
|
||||
# ;;
|
||||
# 4)
|
||||
# CPU2="Quad"
|
||||
# ;;
|
||||
# [5-9]|[1-9][0-9])
|
||||
# CPU2="${#A_CPU_DATA[@]}x"
|
||||
# ;;
|
||||
# *)
|
||||
# unset CPU2
|
||||
# ;;
|
||||
# esac
|
||||
# fi
|
||||
|
||||
IFS=","
|
||||
a_cpu_working=(${A_CPU_DATA[0]})
|
||||
|
@ -921,16 +900,26 @@ get_cpu_data()
|
|||
sses[3] = "sse3"
|
||||
}
|
||||
/^(nx|lm|svm|vmx)$/ {
|
||||
if (s) { s = s " " $0 }
|
||||
else { s = $0 }
|
||||
if (s) {
|
||||
s = s " " $0
|
||||
}
|
||||
else {
|
||||
s = $0
|
||||
}
|
||||
}
|
||||
/^(sse2?|pni)$/ {
|
||||
if (ssel[$0] > sse) sse = ssel[$0]
|
||||
if (ssel[$0] > sse) {
|
||||
sse = ssel[$0]
|
||||
}
|
||||
}
|
||||
END {
|
||||
if (sse) {
|
||||
if (s) s = sses[sse] " " s;
|
||||
else s = sses[sse]
|
||||
if (s) {
|
||||
s = sses[sse] " " s
|
||||
}
|
||||
else {
|
||||
s = sses[sse]
|
||||
}
|
||||
}
|
||||
print s
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue