Changeset 679 for GPL/trunk/alsa-kernel/include/sound/rawmidi.h
- Timestamp:
- Mar 18, 2021, 8:57:36 PM (5 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
alsa-kernel/include/sound/rawmidi.h (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-linux-3.2.102 (added) merged: 611-614 /GPL/branches/uniaud32-next (added) merged: 615-678
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/include/sound/rawmidi.h
r598 r679 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 1 2 #ifndef __SOUND_RAWMIDI_H 2 3 #define __SOUND_RAWMIDI_H … … 5 6 * Abstract layer for MIDI v1.0 stream 6 7 * Copyright (c) by Jaroslav Kysela <perex@perex.cz> 7 *8 *9 * This program is free software; you can redistribute it and/or modify10 * it under the terms of the GNU General Public License as published by11 * the Free Software Foundation; either version 2 of the License, or12 * (at your option) any later version.13 *14 * This program is distributed in the hope that it will be useful,15 * but WITHOUT ANY WARRANTY; without even the implied warranty of16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17 * GNU General Public License for more details.18 *19 * You should have received a copy of the GNU General Public License20 * along with this program; if not, write to the Free Software21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA22 *23 8 */ 24 9 … … 28 13 #include <linux/wait.h> 29 14 #include <linux/mutex.h> 15 #include <linux/workqueue.h> 16 #include <linux/device.h> 30 17 31 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)32 #include "seq_device.h"18 #if IS_ENABLED(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER) 19 #include <sound/seq_device.h> 33 20 #endif 34 21 … … 64 51 65 52 struct snd_rawmidi_runtime { 53 struct snd_rawmidi_substream *substream; 66 54 unsigned int drain: 1, /* drain stage */ 67 55 oss: 1; /* OSS compatible mode */ … … 74 62 size_t avail; /* max used buffer for wakeup */ 75 63 size_t xruns; /* over/underruns counter */ 64 int buffer_ref; /* buffer reference count */ 76 65 /* misc */ 77 66 spinlock_t lock; … … 80 69 void (*event)(struct snd_rawmidi_substream *substream); 81 70 /* defers calls to event [input] or ops->trigger [output] */ 82 struct tasklet_struct tasklet;71 struct work_struct event_work; 83 72 /* private data */ 84 73 void *private_data; … … 90 79 int stream; /* direction */ 91 80 int number; /* substream number */ 92 unsigned int opened: 1,/* open flag */93 append: 1,/* append flag (merge more streams) */94 active_sensing: 1;/* send active sensing when close */81 bool opened; /* open flag */ 82 bool append; /* append flag (merge more streams) */ 83 bool active_sensing; /* send active sensing when close */ 95 84 int use_count; /* use counter (for output) */ 96 85 size_t bytes; … … 101 90 struct pid *pid; 102 91 /* hardware layer */ 103 struct snd_rawmidi_ops *ops;92 const struct snd_rawmidi_ops *ops; 104 93 }; 105 94 … … 128 117 #endif 129 118 130 struct snd_rawmidi_global_ops *ops;119 const struct snd_rawmidi_global_ops *ops; 131 120 132 121 struct snd_rawmidi_str streams[2]; … … 138 127 wait_queue_head_t open_wait; 139 128 140 struct snd_info_entry *dev; 129 struct device dev; 130 141 131 struct snd_info_entry *proc_entry; 142 132 143 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)133 #if IS_ENABLED(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER) 144 134 struct snd_seq_device *seq_dev; 145 135 #endif … … 152 142 struct snd_rawmidi **rmidi); 153 143 void snd_rawmidi_set_ops(struct snd_rawmidi *rmidi, int stream, 154 struct snd_rawmidi_ops *ops);144 const struct snd_rawmidi_ops *ops); 155 145 156 146 /* callbacks */ 157 147 158 void snd_rawmidi_receive_reset(struct snd_rawmidi_substream *substream);159 148 int snd_rawmidi_receive(struct snd_rawmidi_substream *substream, 160 149 const unsigned char *buffer, int count); 161 void snd_rawmidi_transmit_reset(struct snd_rawmidi_substream *substream);162 150 int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream); 163 151 int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream, … … 166 154 int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream, 167 155 unsigned char *buffer, int count); 156 int __snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream, 157 unsigned char *buffer, int count); 158 int __snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, 159 int count); 160 int snd_rawmidi_proceed(struct snd_rawmidi_substream *substream); 168 161 169 162 /* main midi functions */
Note:
See TracChangeset
for help on using the changeset viewer.
