Changeset 642
- Timestamp:
- Jan 8, 2021, 9:57:26 AM (5 years ago)
- 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 760 760 761 761 /* 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 } 764 769 765 770 snd_pcm_timer_resolution_change(substream); -
GPL/branches/uniaud32-next/alsa-kernel/core/rawmidi.c
r637 r642 109 109 } 110 110 111 static inline int snd_rawmidi_ready(struct snd_rawmidi_substream *substream) 111 static inline bool __snd_rawmidi_ready(struct snd_rawmidi_runtime *runtime) 112 { 113 return runtime->avail >= runtime->avail_min; 114 } 115 116 static bool snd_rawmidi_ready(struct snd_rawmidi_substream *substream) 112 117 { 113 118 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; 116 126 } 117 127 … … 1041 1051 if (runtime->event) 1042 1052 schedule_work(&runtime->event_work); 1043 else if ( snd_rawmidi_ready(substream))1053 else if (__snd_rawmidi_ready(runtime)) 1044 1054 wake_up(&runtime->sleep); 1045 1055 } … … 1120 1130 while (count > 0) { 1121 1131 spin_lock_irq(&runtime->lock); 1122 while (! snd_rawmidi_ready(substream)) {1132 while (!__snd_rawmidi_ready(runtime)) { 1123 1133 wait_queue_entry_t wait; 1124 1134 … … 1137 1147 if (signal_pending(current)) 1138 1148 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); 1140 1152 return result > 0 ? result : -EIO; 1141 spin_lock_irq(&runtime->lock);1153 } 1142 1154 } 1143 1155 spin_unlock_irq(&runtime->lock); … … 1277 1289 substream->bytes += count; 1278 1290 if (count > 0) { 1279 if (runtime->drain || snd_rawmidi_ready(substream))1291 if (runtime->drain || __snd_rawmidi_ready(runtime)) 1280 1292 wake_up(&runtime->sleep); 1281 1293 } … … 1466 1478 if (signal_pending(current)) 1467 1479 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); 1469 1483 return result > 0 ? result : -EIO; 1470 spin_lock_irq(&runtime->lock);1484 } 1471 1485 } 1472 1486 spin_unlock_irq(&runtime->lock); … … 1548 1562 struct snd_rawmidi_substream *substream; 1549 1563 struct snd_rawmidi_runtime *runtime; 1564 unsigned long buffer_size, avail, xruns; 1550 1565 1551 1566 rmidi = entry->private_data; … … 1566 1581 pid_vnr(substream->pid)); 1567 1582 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); 1568 1587 snd_iprintf(buffer, 1569 1588 " Mode : %s\n" … … 1571 1590 " Avail : %lu\n", 1572 1591 runtime->oss ? "OSS compatible" : "native", 1573 (unsigned long) runtime->buffer_size, 1574 (unsigned long) runtime->avail); 1592 buffer_size, avail); 1575 1593 } 1576 1594 } … … 1590 1608 pid_vnr(substream->pid)); 1591 1609 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); 1592 1615 snd_iprintf(buffer, 1593 1616 " Buffer size : %lu\n" 1594 1617 " Avail : %lu\n" 1595 1618 " Overruns : %lu\n", 1596 (unsigned long) runtime->buffer_size, 1597 (unsigned long) runtime->avail, 1598 (unsigned long) runtime->xruns); 1619 buffer_size, avail, xruns); 1599 1620 } 1600 1621 } -
GPL/branches/uniaud32-next/alsa-kernel/core/seq/seq_queue.h
r615 r642 27 27 struct snd_seq_timer *timer; /* time keeper for this queue */ 28 28 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 */ 33 33 34 34 unsigned int flags; /* status flags */ -
GPL/branches/uniaud32-next/alsa-kernel/include/sound/version.h
r629 r642 1 1 /* include/version.h */ 2 #define CONFIG_SND_VERSION "5.10. 4"2 #define CONFIG_SND_VERSION "5.10.5" 3 3 #define CONFIG_SND_DATE ""
Note:
See TracChangeset
for help on using the changeset viewer.