pcm_mixer: fix auto frequency switch stopping playback on some targets

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Tue, 9 Jun 2026 08:23:33 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit c5c39a3fdb5f6894e282fe528dc4d4a652620c41
Author: Roman Artiukhin <[email protected]>
Date:   Tue Jun 9 12:39:37 2026 +0300

    pcm_mixer: fix auto frequency switch stopping playback on some targets
    
    Regression from cb04b816. Restores sound by re‑adding
    pcm_play_stop, previously invoked in mixer_reset.
    
    Known affected targets: x1600 hosted hiby port (Hiby R1, Hiby R3 Pro II)
    Discussion: https://forums.rockbox.org/index.php/topic,55125.msg258435.html#msg258435
    
    Change-Id: I5fadac0b47f609e38baad5c7151354ee8f7e9871

diff --git a/firmware/pcm_mixer.c b/firmware/pcm_mixer.c
index ceb5dc986d..5de15ac793 100644
--- a/firmware/pcm_mixer.c
+++ b/firmware/pcm_mixer.c
@@ -522,6 +522,9 @@ void mixer_set_frequency(unsigned int samplerate)
     if(pcm_get_frequency() == samplerate)
         return;
 
+    pcm_play_stop();
+    idle_counter = 0;
+
     pcm_set_frequency(samplerate);
     mixer_handle_sampr_change(SAMPR_NUM(pcm_get_frequency()));
     if (pcm_is_initialized())
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs