Skip to content

fcplay: Fix gapless playback sequencing and add new continuouos playback strategy (restart mode)#33

Open
ujfalusi wants to merge 4 commits intoalsa-project:masterfrom
ujfalusi:topic/fcplay_multiple_files
Open

fcplay: Fix gapless playback sequencing and add new continuouos playback strategy (restart mode)#33
ujfalusi wants to merge 4 commits intoalsa-project:masterfrom
ujfalusi:topic/fcplay_multiple_files

Conversation

@ujfalusi
Copy link

The gapless mode sequence must start with set_metadata then the next_track as the former needs the metadata to beforehand in kernel.

Rework the play_samples() function to allow easier integration of new continuous playback strategies and add new mode to drain, close, open, configure and start for each file in list.

The kernel demands the metadata to be set before the next_track is
signaled (since 2013).
Calling next_track before set metadata will case the next_track to be
'lost' in core's snd_compr_next_track().

Reverse the call order of next_track and set_metadata to fix this.

Fixes: 40603c0 ("fcplay: Modify play_samples func to support gapless playback.")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
No functional change, just to prepare to support different continuous
playback strategies.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
… flag

Add continuous_playback_mode enum to allow expanding the strategies used
for continuous compressed playback (when more than one file is played in a
sequence).
Currently fcplay supports two modes:
0 (w/o -g 1) when each file is just sent over the compress buffer without
	     any  action taken in between the files - NOP mode
1 (w/ -g 1) gapless mode, using metadata, neext_track and partial drain -
	    GAPLESS mode

No functional change expected.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Restart the compress device between each track.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@ujfalusi ujfalusi changed the title fcplay: FIx gapless playback sequencing and add new continuouos playback strategy (restart mode) fcplay: Fix gapless playback sequencing and add new continuouos playback strategy (restart mode) Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant