Lines Matching refs:buffer
133 /* buffer refcount management: call with runtime->lock held */
162 runtime->buffer = kvzalloc(runtime->buffer_size, GFP_KERNEL);
163 if (!runtime->buffer) {
176 kvfree(runtime->buffer);
698 oldbuf = runtime->buffer;
699 runtime->buffer = newbuf;
969 * @buffer: the buffer pointer
972 * Reads the data from the internal buffer.
977 const unsigned char *buffer, int count)
985 if (runtime->buffer == NULL) {
994 runtime->buffer[runtime->hw_ptr++] = buffer[0];
1008 memcpy(runtime->buffer + runtime->hw_ptr, buffer, count1);
1015 buffer += count1;
1022 memcpy(runtime->buffer, buffer, count1);
1066 memcpy(kernelbuf + result, runtime->buffer + appl_ptr, count1);
1070 runtime->buffer + appl_ptr, count1))
1149 * snd_rawmidi_transmit_empty - check whether the output buffer is empty
1152 * Return: 1 if the internal output buffer is empty, 0 if not.
1160 if (runtime->buffer == NULL) {
1173 * __snd_rawmidi_transmit_peek - copy data from the internal buffer
1175 * @buffer: the buffer pointer
1181 unsigned char *buffer, int count)
1186 if (runtime->buffer == NULL) {
1197 *buffer = runtime->buffer[runtime->hw_ptr];
1205 memcpy(buffer, runtime->buffer + runtime->hw_ptr, count1);
1211 memcpy(buffer + count1, runtime->buffer, count);
1221 * snd_rawmidi_transmit_peek - copy data from the internal buffer
1223 * @buffer: the buffer pointer
1226 * Copies data from the internal output buffer to the given buffer.
1235 unsigned char *buffer, int count)
1242 result = __snd_rawmidi_transmit_peek(substream, buffer, count);
1259 if (runtime->buffer == NULL) {
1282 * Advances the hardware pointer for the internal output buffer with
1302 * snd_rawmidi_transmit - copy from the buffer to the device
1304 * @buffer: the buffer pointer
1307 * Copies data from the buffer to the device and advances the pointer.
1312 unsigned char *buffer, int count)
1322 count = __snd_rawmidi_transmit_peek(substream, buffer, count);
1367 if (snd_BUG_ON(!runtime->buffer))
1393 memcpy(runtime->buffer + appl_ptr,
1397 if (copy_from_user(runtime->buffer + appl_ptr,
1436 /* we cannot put an atomic message to our buffer */
1538 struct snd_info_buffer *buffer)
1546 snd_iprintf(buffer, "%s\n\n", rmidi->name);
1552 snd_iprintf(buffer,
1558 snd_iprintf(buffer,
1566 snd_iprintf(buffer,
1579 snd_iprintf(buffer,
1585 snd_iprintf(buffer,
1594 snd_iprintf(buffer,