Lines Matching refs:buffer
135 /* buffer refcount management: call with substream->lock held */
180 runtime->buffer = kvzalloc(runtime->buffer_size, GFP_KERNEL);
181 if (!runtime->buffer) {
208 kvfree(runtime->buffer);
265 if (!substream->opened || !runtime || !runtime->buffer) {
753 oldbuf = runtime->buffer;
754 runtime->buffer = newbuf;
1102 const unsigned char *buffer, int src_count, const struct timespec64 *tstamp)
1128 memcpy(frame.data, buffer, frame.length);
1129 buffer += frame.length;
1131 dest_ptr = (struct snd_rawmidi_framing_tstamp *) (runtime->buffer + runtime->hw_ptr);
1161 * @buffer: the buffer pointer
1164 * Reads the data from the internal buffer.
1169 const unsigned char *buffer, int count)
1182 if (!runtime || !runtime->buffer) {
1194 result = receive_with_tstamp_framing(substream, buffer, count, &ts64);
1198 runtime->buffer[runtime->hw_ptr++] = buffer[0];
1215 memcpy(runtime->buffer + runtime->hw_ptr, buffer, count1);
1222 buffer += count1;
1229 memcpy(runtime->buffer, buffer, count1);
1274 memcpy(kernelbuf + result, runtime->buffer + appl_ptr, count1);
1278 runtime->buffer + appl_ptr, count1))
1357 * snd_rawmidi_transmit_empty - check whether the output buffer is empty
1360 * Return: 1 if the internal output buffer is empty, 0 if not.
1370 if (!substream->opened || !runtime || !runtime->buffer) {
1383 * __snd_rawmidi_transmit_peek - copy data from the internal buffer
1385 * @buffer: the buffer pointer
1391 unsigned char *buffer, int count)
1396 if (runtime->buffer == NULL) {
1407 *buffer = runtime->buffer[runtime->hw_ptr];
1418 memcpy(buffer, runtime->buffer + runtime->hw_ptr, count1);
1427 memcpy(buffer + count1, runtime->buffer, count);
1436 * snd_rawmidi_transmit_peek - copy data from the internal buffer
1438 * @buffer: the buffer pointer
1441 * Copies data from the internal output buffer to the given buffer.
1450 unsigned char *buffer, int count)
1459 result = __snd_rawmidi_transmit_peek(substream, buffer, count);
1477 if (runtime->buffer == NULL) {
1500 * Advances the hardware pointer for the internal output buffer with
1522 * snd_rawmidi_transmit - copy from the buffer to the device
1524 * @buffer: the buffer pointer
1527 * Copies data from the buffer to the device and advances the pointer.
1532 unsigned char *buffer, int count)
1541 count = __snd_rawmidi_transmit_peek(substream, buffer, count);
1588 if (snd_BUG_ON(!runtime->buffer))
1614 memcpy(runtime->buffer + appl_ptr,
1618 if (copy_from_user(runtime->buffer + appl_ptr,
1657 /* we cannot put an atomic message to our buffer */
1759 struct snd_info_buffer *buffer)
1769 snd_iprintf(buffer, "%s\n\n", rmidi->name);
1771 snd_iprintf(buffer, "Type: %s\n",
1774 rmidi->ops->proc_read(entry, buffer);
1780 snd_iprintf(buffer,
1786 snd_iprintf(buffer,
1794 snd_iprintf(buffer,
1807 snd_iprintf(buffer,
1813 snd_iprintf(buffer,
1822 snd_iprintf(buffer,
1830 snd_iprintf(buffer,