Changeset 642


Ignore:
Timestamp:
Jan 8, 2021, 9:57:26 AM (5 years ago)
Author:
Paul Smedley
Message:

Update code to linux 5.10.5 level

Location:
GPL/branches/uniaud32-next/alsa-kernel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/alsa-kernel/core/pcm_native.c

    r637 r642  
    760760
    761761        /* clear the buffer for avoiding possible kernel info leaks */
    762         if (runtime->dma_area && !substream->ops->copy_user)
    763                 memset(runtime->dma_area, 0, runtime->dma_bytes);
     762        if (runtime->dma_area && !substream->ops->copy_user) {
     763                size_t size = runtime->dma_bytes;
     764
     765                if (runtime->info & SNDRV_PCM_INFO_MMAP)
     766                        size = PAGE_ALIGN(size);
     767                memset(runtime->dma_area, 0, size);
     768        }
    764769
    765770        snd_pcm_timer_resolution_change(substream);
  • GPL/branches/uniaud32-next/alsa-kernel/core/rawmidi.c

    r637 r642  
    109109}
    110110
    111 static inline int snd_rawmidi_ready(struct snd_rawmidi_substream *substream)
     111static inline bool __snd_rawmidi_ready(struct snd_rawmidi_runtime *runtime)
     112{
     113        return runtime->avail >= runtime->avail_min;
     114}
     115
     116static bool snd_rawmidi_ready(struct snd_rawmidi_substream *substream)
    112117{
    113118        struct snd_rawmidi_runtime *runtime = substream->runtime;
    114 
    115         return runtime->avail >= runtime->avail_min;
     119        unsigned long flags;
     120        bool ready;
     121
     122        spin_lock_irqsave(&runtime->lock, flags);
     123        ready = __snd_rawmidi_ready(runtime);
     124        spin_unlock_irqrestore(&runtime->lock, flags);
     125        return ready;
    116126}
    117127
     
    10411051                if (runtime->event)
    10421052                        schedule_work(&runtime->event_work);
    1043                 else if (snd_rawmidi_ready(substream))
     1053                else if (__snd_rawmidi_ready(runtime))
    10441054                        wake_up(&runtime->sleep);
    10451055        }
     
    11201130        while (count > 0) {
    11211131                spin_lock_irq(&runtime->lock);
    1122                 while (!snd_rawmidi_ready(substream)) {
     1132                while (!__snd_rawmidi_ready(runtime)) {
    11231133                        wait_queue_entry_t wait;
    11241134
     
    11371147                        if (signal_pending(current))
    11381148                                return result > 0 ? result : -ERESTARTSYS;
    1139                         if (!runtime->avail)
     1149                        spin_lock_irq(&runtime->lock);
     1150                        if (!runtime->avail) {
     1151                                spin_unlock_irq(&runtime->lock);
    11401152                                return result > 0 ? result : -EIO;
    1141                         spin_lock_irq(&runtime->lock);
     1153                        }
    11421154                }
    11431155                spin_unlock_irq(&runtime->lock);
     
    12771289        substream->bytes += count;
    12781290        if (count > 0) {
    1279                 if (runtime->drain || snd_rawmidi_ready(substream))
     1291                if (runtime->drain || __snd_rawmidi_ready(runtime))
    12801292                        wake_up(&runtime->sleep);
    12811293        }
     
    14661478                        if (signal_pending(current))
    14671479                                return result > 0 ? result : -ERESTARTSYS;
    1468                         if (!runtime->avail && !timeout)
     1480                        spin_lock_irq(&runtime->lock);
     1481                        if (!runtime->avail && !timeout) {
     1482                                spin_unlock_irq(&runtime->lock);
    14691483                                return result > 0 ? result : -EIO;
    1470                         spin_lock_irq(&runtime->lock);
     1484                        }
    14711485                }
    14721486                spin_unlock_irq(&runtime->lock);
     
    15481562        struct snd_rawmidi_substream *substream;
    15491563        struct snd_rawmidi_runtime *runtime;
     1564        unsigned long buffer_size, avail, xruns;
    15501565
    15511566        rmidi = entry->private_data;
     
    15661581                                    pid_vnr(substream->pid));
    15671582                                runtime = substream->runtime;
     1583                                spin_lock_irq(&runtime->lock);
     1584                                buffer_size = runtime->buffer_size;
     1585                                avail = runtime->avail;
     1586                                spin_unlock_irq(&runtime->lock);
    15681587                                snd_iprintf(buffer,
    15691588                                    "  Mode         : %s\n"
     
    15711590                                    "  Avail        : %lu\n",
    15721591                                    runtime->oss ? "OSS compatible" : "native",
    1573                                     (unsigned long) runtime->buffer_size,
    1574                                     (unsigned long) runtime->avail);
     1592                                    buffer_size, avail);
    15751593                        }
    15761594                }
     
    15901608                                            pid_vnr(substream->pid));
    15911609                                runtime = substream->runtime;
     1610                                spin_lock_irq(&runtime->lock);
     1611                                buffer_size = runtime->buffer_size;
     1612                                avail = runtime->avail;
     1613                                xruns = runtime->xruns;
     1614                                spin_unlock_irq(&runtime->lock);
    15921615                                snd_iprintf(buffer,
    15931616                                            "  Buffer size  : %lu\n"
    15941617                                            "  Avail        : %lu\n"
    15951618                                            "  Overruns     : %lu\n",
    1596                                             (unsigned long) runtime->buffer_size,
    1597                                             (unsigned long) runtime->avail,
    1598                                             (unsigned long) runtime->xruns);
     1619                                            buffer_size, avail, xruns);
    15991620                        }
    16001621                }
  • GPL/branches/uniaud32-next/alsa-kernel/core/seq/seq_queue.h

    r615 r642  
    2727        struct snd_seq_timer *timer;    /* time keeper for this queue */
    2828        int     owner;          /* client that 'owns' the timer */
    29         unsigned int    locked:1,       /* timer is only accesibble by owner if set */
    30                 klocked:1,      /* kernel lock (after START) */
    31                 check_again:1,
    32                 check_blocked:1;
     29        bool    locked;         /* timer is only accesibble by owner if set */
     30        bool    klocked;        /* kernel lock (after START) */
     31        bool    check_again;    /* concurrent access happened during check */
     32        bool    check_blocked;  /* queue being checked */
    3333
    3434        unsigned int flags;             /* status flags */
  • GPL/branches/uniaud32-next/alsa-kernel/include/sound/version.h

    r629 r642  
    11/* include/version.h */
    2 #define CONFIG_SND_VERSION "5.10.4"
     2#define CONFIG_SND_VERSION "5.10.5"
    33#define CONFIG_SND_DATE ""
Note: See TracChangeset for help on using the changeset viewer.