Skip to content

Commit

Permalink
Deal with edge cases where drivers use non-ESS playback route
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Mar 5, 2024
1 parent 9f50fae commit e9996d4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/sound/snd_sb_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ sb_start_dma(sb_dsp_t *dsp, int dma8, int autoinit, uint8_t format, int len)
{
dsp->sb_pausetime = -1;

if (dsp->ess_reload_len) {
len = sb_ess_get_dma_len(dsp);
dsp->ess_reload_len = 0;
}

if (dma8) {
dsp->sb_8_length = dsp->sb_8_origlength = len;
dsp->sb_8_format = format;
Expand Down Expand Up @@ -392,6 +397,11 @@ sb_start_dma(sb_dsp_t *dsp, int dma8, int autoinit, uint8_t format, int len)
void
sb_start_dma_i(sb_dsp_t *dsp, int dma8, int autoinit, uint8_t format, int len)
{
if (dsp->ess_reload_len) {
len = sb_ess_get_dma_len(dsp);
dsp->ess_reload_len = 0;
}

if (dma8) {
dsp->sb_8_length = dsp->sb_8_origlength = len;
dsp->sb_8_format = format;
Expand Down

0 comments on commit e9996d4

Please sign in to comment.