File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -1443,7 +1443,8 @@ update_topology_filename() {
14431443 exit 1
14441444 fi
14451445 if [[ -f " $modprobe_file " ]]; then
1446- old_topology=$( sudo cat " $modprobe_file " )
1446+ modprobe_file_output=$( sudo cat " $modprobe_file " )
1447+ old_topology=" ${modprobe_file_output#* =} "
14471448 echo " Old topology: $old_topology "
14481449 fi
14491450 # Check if the remove and insert scripts exist
@@ -1471,13 +1472,15 @@ update_topology_filename() {
14711472
14721473# Restore the original topology after the test
14731474restore_topology () {
1474- if [[ -f " $old_topology " ]]; then
1475- echo " $old_topology " | sudo tee " $modprobe_file " > /dev/null
1476- echo " Restored original topology: $old_topology "
1477- sudo " $remove_script "
1478- sudo " $insert_script "
1479- fi
1480- check_topology
1475+ if [[ -f " $old_topology " ]]; then
1476+ echo " options snd-sof-pci tplg_filename=$old_topology " | sudo tee " $modprobe_file " > /dev/null
1477+ echo " Restored original topology: $old_topology "
1478+
1479+ echo " Reloading drivers"
1480+ sudo " $remove_script "
1481+ sudo " $insert_script "
1482+ fi
1483+ check_topology
14811484}
14821485
14831486# Play sound and record it
You can’t perform that action at this time.
0 commit comments