Fix msm8916-wcd-digital ASoC DAPM teardown crash after notification audio
This commit is contained in:
1 parent
06d991d4fa
commit
b9e7c6847b
13 files changed
+15
-119
No files matched your search
BIN
Binary file not shown.
@@ -301,6 +301,7 @@ checkfornewtexts() {
|
||||
stderr "Text from number: $NUM (TEXTID: $TEXTID)"
|
||||
sxmo_hook_smslog.sh "recv" "$NUM" "$NUM" "$TIME" "$TEXT" >> "$SXMO_LOGDIR/$NUM/sms.txt"
|
||||
printf "%s\trecv_txt\t%s\t%s\n" "$TIME" "$NUM" "$TSV_TEXT" >> "$SXMO_LOGDIR/modemlog.tsv"
|
||||
sync
|
||||
if [ -p /tmp/dwm_plugin_sms.fifo ]; then
|
||||
printf "REFRESH\n" > /tmp/dwm_plugin_sms.fifo 2>/dev/null || true
|
||||
fi
|
||||
|
||||
@@ -30,6 +30,9 @@ clear_all() {
|
||||
_handle_new_notif_file() {
|
||||
file="$1"
|
||||
mode="$2"
|
||||
case "${file##*/}" in
|
||||
.*) return 0 ;;
|
||||
esac
|
||||
[ -f "$file" ] || return 0
|
||||
|
||||
if [ "$(wc -l < "$file" 2>/dev/null || echo 0)" -lt 3 ]; then
|
||||
@@ -193,7 +196,9 @@ new() {
|
||||
msg="$2"
|
||||
|
||||
mkdir -p "$SXMO_NOTIFDIR"
|
||||
printf "%s\n%s\n%b\n" "$group" "$action" "$msg" > "$SXMO_NOTIFDIR/$id"
|
||||
tmp_notif="$SXMO_NOTIFDIR/.tmp.$id.$$"
|
||||
printf "%s\n%s\n%b\n" "$group" "$action" "$msg" > "$tmp_notif"
|
||||
mv -f "$tmp_notif" "$SXMO_NOTIFDIR/$id"
|
||||
|
||||
if ! pgrep -f "sxmo_notifs.sh monitor" >/dev/null 2>&1; then
|
||||
sxmo_hook_notification.sh "$SXMO_NOTIFDIR/$id" &
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -2185,6 +2185,8 @@ def append_modemlog(line):
|
||||
try:
|
||||
with open(MODEMLOG, "a", encoding="utf-8") as f:
|
||||
f.write(line)
|
||||
f.flush()
|
||||
os.fsync(f.fileno())
|
||||
except Exception:
|
||||
return
|
||||
chown_user(MODEMLOG)
|
||||
@@ -2545,6 +2547,8 @@ def deliver_sms_to_sxmo(sender, iso_ts, text, sim_slot):
|
||||
header = f"Received from {sender} [SIM {sim_slot}] at {now_str}:\n{text}\n\n"
|
||||
with open(sms_file, "a", encoding="utf-8") as f:
|
||||
f.write(header)
|
||||
f.flush()
|
||||
os.fsync(f.fileno())
|
||||
append_modemlog(f"{now_str}\trecv_txt\t{sender}\t[SIM {sim_slot}] {tsv_text}\n")
|
||||
chown_user(sms_file)
|
||||
send_fifo("/tmp/dwm_plugin_sms.fifo", "REFRESH")
|
||||
|
||||
Reference in new issue
Block a user