@@ -97,28 +97,6 @@ analyze_socwatch_results()
9797 fi
9898}
9999
100- check_for_PC10_state ()
101- {
102- pc10_count=$( awk ' /Package C-State Summary: Entry Counts/{f=1; next} f && /PC10/{print $3; exit}' " $socwatch_output " .csv)
103- if [ -z " $pc10_count " ]; then
104- die " PC10 State not achieved"
105- fi
106- dlogi " Entered into PC10 State $pc10_count times"
107-
108- pc10_per=$( awk ' /Package C-State Summary: Residency/{f=1; next} f && /PC10/{print $3; exit}' " $socwatch_output " .csv)
109- pc10_time=$( awk ' /Package C-State Summary: Residency/{f=1; next} f && /PC10/{print $5; exit}' " $socwatch_output " .csv)
110- dlogi " Spent $pc10_time ms ($pc10_per %) in PC10 State"
111-
112- json_str=$( jq -n \
113- --arg id " $i " \
114- --arg cnt " $pc10_count " \
115- --arg time " $pc10_time " \
116- --arg per " $pc10_per " \
117- ' {$id: {pc10_entires_count: $cnt, time_ms: $time, time_percentage: $per}}' )
118-
119- results=$( jq --slurp ' add' <( echo " $results " ) <( echo " $json_str " ) )
120- }
121-
122100check_the_pcms ()
123101{
124102 aplay " -Dplug${pcm_p} " -d 1 /dev/zero -q || die " Failed to play on PCM: ${pcm_p} "
@@ -128,7 +106,6 @@ check_the_pcms()
128106# Checks for soundfile needed for test, generates missing ones
129107prepare_test_soundfile ()
130108{
131- mkdir -p " $HOME /Music"
132109 if [ ! -f " $audio_filename " ]; then
133110 generate_mp3_file " $audio_filename "
134111 fi
@@ -137,13 +114,12 @@ prepare_test_soundfile()
137114run_test ()
138115{
139116 check_the_pcms
140- # audio_filename="$HOME/Music/test.mp3"
141- # prepare_test_soundfile
117+ audio_filename=" $HOME /Music/test-2ch .mp3"
118+ prepare_test_soundfile
142119
143120 socwatch_output=" $LOG_ROOT /socwatch-results/socwatch_report"
144121
145- # play_command="cplay -D${pcm_p} -d ${duration} ${audio_filename}"
146- play_command=(aplay -Dplug${pcm_p} -d ${duration} /dev/zero)
122+ play_command=" cplay -c 0 -d 50 -I MP3 ${audio_filename} -v"
147123 run_with_socwatch " $socwatch_output " " ${play_command[@]} "
148124
149125 analyze_socwatch_results
@@ -153,13 +129,7 @@ main()
153129{
154130 export RUN_SOCWATCH=true
155131 start_test
156- if [ " $pcm_p " = " " ]|| [ " $pcm_c " = " " ];
157- then
158- dloge " No playback or capture PCM specified."
159- exit 2
160- fi
161132 logger_disabled || func_lib_start_log_collect
162-
163133 run_test
164134}
165135
0 commit comments