Ignore:
Timestamp:
Apr 19, 2025, 8:08:37 PM (4 months ago)
Author:
David Azarewicz
Message:

Merge in changes from 6.6-LTS branch.
Fixed additional 25+ problems.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/include/sound/pcm-indirect.h

    r679 r772  
    4545                        diff += runtime->boundary;
    4646                if (diff < 0)
    47                         return -EINVAL;
     47                        return -EPIPE;
    4848                rec->sw_ready += (int)frames_to_bytes(runtime, diff);
    4949                rec->appl_ptr = appl_ptr;
     
    8484{
    8585        int bytes = ptr - rec->hw_io;
     86        int err;
     87
    8688        if (bytes < 0)
    8789                bytes += rec->hw_buffer_size;
     
    9193        if (rec->sw_io >= rec->sw_buffer_size)
    9294                rec->sw_io -= rec->sw_buffer_size;
    93         if (substream->ops->ack)
    94                 substream->ops->ack(substream);
     95        if (substream->ops->ack) {
     96                err = substream->ops->ack(substream);
     97                if (err == -EPIPE)
     98                        return SNDRV_PCM_POS_XRUN;
     99        }
    95100        return bytes_to_frames(substream->runtime, rec->sw_io);
    96101}
     
    113118                        diff += runtime->boundary;
    114119                if (diff < 0)
    115                         return -EINVAL;
     120                        return -EPIPE;
    116121                rec->sw_ready -= frames_to_bytes(runtime, diff);
    117122                rec->appl_ptr = appl_ptr;
     
    153158        int qsize;
    154159        int bytes = ptr - rec->hw_io;
     160        int err;
     161
    155162        if (bytes < 0)
    156163                bytes += rec->hw_buffer_size;
     
    163170        if (rec->sw_io >= rec->sw_buffer_size)
    164171                rec->sw_io -= rec->sw_buffer_size;
    165         if (substream->ops->ack)
    166                 substream->ops->ack(substream);
     172        if (substream->ops->ack) {
     173                err = substream->ops->ack(substream);
     174                if (err == -EPIPE)
     175                        return SNDRV_PCM_POS_XRUN;
     176        }
    167177        return bytes_to_frames(substream->runtime, rec->sw_io);
    168178}
Note: See TracChangeset for help on using the changeset viewer.