Commit cddbd4f1 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: line6: Tidy up and typo fixes in comments

Just reformatting the comments and typos fixed, no functional
changes.  Particularly,
- avoid the kerneldoc marker "/**",
- reduce multiple comment lines into single lines,
- corrected wrongly referred function names
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 0416980d
...@@ -44,7 +44,7 @@ static const char line6_request_version[] = { ...@@ -44,7 +44,7 @@ static const char line6_request_version[] = {
0xf0, 0x7e, 0x7f, 0x06, 0x01, 0xf7 0xf0, 0x7e, 0x7f, 0x06, 0x01, 0xf7
}; };
/** /*
Class for asynchronous messages. Class for asynchronous messages.
*/ */
struct message { struct message {
......
...@@ -60,26 +60,20 @@ extern const unsigned char line6_midi_id[3]; ...@@ -60,26 +60,20 @@ extern const unsigned char line6_midi_id[3];
static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3; static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3;
static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4; static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4;
/** /*
Common properties of Line 6 devices. Common properties of Line 6 devices.
*/ */
struct line6_properties { struct line6_properties {
/** /* Card id string (maximum 16 characters).
Card id string (maximum 16 characters). * This can be used to address the device in ALSA programs as
This can be used to address the device in ALSA programs as * "default:CARD=<id>"
"default:CARD=<id>" */
*/
const char *id; const char *id;
/** /* Card short name (maximum 32 characters) */
Card short name (maximum 32 characters).
*/
const char *name; const char *name;
/** /* Bit vector defining this device's capabilities in line6usb driver */
Bit vector defining this device's capabilities in the
line6usb driver.
*/
int capabilities; int capabilities;
int altsetting; int altsetting;
...@@ -90,70 +84,47 @@ struct line6_properties { ...@@ -90,70 +84,47 @@ struct line6_properties {
unsigned ep_audio_w; unsigned ep_audio_w;
}; };
/** /*
Common data shared by all Line 6 devices. Common data shared by all Line 6 devices.
Corresponds to a pair of USB endpoints. Corresponds to a pair of USB endpoints.
*/ */
struct usb_line6 { struct usb_line6 {
/** /* USB device */
USB device.
*/
struct usb_device *usbdev; struct usb_device *usbdev;
/** /* Properties */
Properties.
*/
const struct line6_properties *properties; const struct line6_properties *properties;
/** /* Interval (ms) */
Interval (ms).
*/
int interval; int interval;
/** /* Maximum size of USB packet */
Maximum size of USB packet.
*/
int max_packet_size; int max_packet_size;
/** /* Device representing the USB interface */
Device representing the USB interface.
*/
struct device *ifcdev; struct device *ifcdev;
/** /* Line 6 sound card data structure.
Line 6 sound card data structure. * Each device has at least MIDI or PCM.
Each device has at least MIDI or PCM. */
*/
struct snd_card *card; struct snd_card *card;
/** /* Line 6 PCM device data structure */
Line 6 PCM device data structure.
*/
struct snd_line6_pcm *line6pcm; struct snd_line6_pcm *line6pcm;
/** /* Line 6 MIDI device data structure */
Line 6 MIDI device data structure.
*/
struct snd_line6_midi *line6midi; struct snd_line6_midi *line6midi;
/** /* URB for listening to PODxt Pro control endpoint */
URB for listening to PODxt Pro control endpoint.
*/
struct urb *urb_listen; struct urb *urb_listen;
/** /* Buffer for listening to PODxt Pro control endpoint */
Buffer for listening to PODxt Pro control endpoint.
*/
unsigned char *buffer_listen; unsigned char *buffer_listen;
/** /* Buffer for message to be processed */
Buffer for message to be processed.
*/
unsigned char *buffer_message; unsigned char *buffer_message;
/** /* Length of message to be processed */
Length of message to be processed.
*/
int message_length; int message_length;
void (*process_message)(struct usb_line6 *); void (*process_message)(struct usb_line6 *);
......
...@@ -19,44 +19,28 @@ ...@@ -19,44 +19,28 @@
#define MIDI_BUFFER_SIZE 1024 #define MIDI_BUFFER_SIZE 1024
struct snd_line6_midi { struct snd_line6_midi {
/** /* Pointer back to the Line 6 driver data structure */
Pointer back to the Line 6 driver data structure.
*/
struct usb_line6 *line6; struct usb_line6 *line6;
/** /* MIDI substream for receiving (or NULL if not active) */
MIDI substream for receiving (or NULL if not active).
*/
struct snd_rawmidi_substream *substream_receive; struct snd_rawmidi_substream *substream_receive;
/** /* MIDI substream for transmitting (or NULL if not active) */
MIDI substream for transmitting (or NULL if not active).
*/
struct snd_rawmidi_substream *substream_transmit; struct snd_rawmidi_substream *substream_transmit;
/** /* Number of currently active MIDI send URBs */
Number of currently active MIDI send URBs.
*/
int num_active_send_urbs; int num_active_send_urbs;
/** /* Spin lock to protect MIDI buffer handling */
Spin lock to protect MIDI buffer handling.
*/
spinlock_t lock; spinlock_t lock;
/** /* Wait queue for MIDI transmission */
Wait queue for MIDI transmission.
*/
wait_queue_head_t send_wait; wait_queue_head_t send_wait;
/** /* Buffer for incoming MIDI stream */
Buffer for incoming MIDI stream.
*/
struct midi_buffer midibuf_in; struct midi_buffer midibuf_in;
/** /* Buffer for outgoing MIDI stream */
Buffer for outgoing MIDI stream.
*/
struct midi_buffer midibuf_out; struct midi_buffer midibuf_out;
}; };
......
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
the running flag indicates whether the stream is running. the running flag indicates whether the stream is running.
For monitor or impulse operations, the driver needs to call For monitor or impulse operations, the driver needs to call
snd_line6_duplex_acquire() or snd_line6_duplex_release() with the line6_pcm_acquire() or line6_pcm_release() with the appropriate
appropriate LINE6_STREAM_* flag. LINE6_STREAM_* flag.
*/ */
/* stream types */ /* stream types */
...@@ -139,19 +139,13 @@ struct line6_pcm_stream { ...@@ -139,19 +139,13 @@ struct line6_pcm_stream {
}; };
struct snd_line6_pcm { struct snd_line6_pcm {
/** /* Pointer back to the Line 6 driver data structure */
Pointer back to the Line 6 driver data structure.
*/
struct usb_line6 *line6; struct usb_line6 *line6;
/** /* Properties. */
Properties.
*/
struct line6_pcm_properties *properties; struct line6_pcm_properties *properties;
/** /* ALSA pcm stream */
ALSA pcm stream
*/
struct snd_pcm *pcm; struct snd_pcm *pcm;
/* protection to state changes of in/out streams */ /* protection to state changes of in/out streams */
...@@ -161,49 +155,31 @@ struct snd_line6_pcm { ...@@ -161,49 +155,31 @@ struct snd_line6_pcm {
struct line6_pcm_stream in; struct line6_pcm_stream in;
struct line6_pcm_stream out; struct line6_pcm_stream out;
/** /* Previously captured frame (for software monitoring) */
Previously captured frame (for software monitoring).
*/
unsigned char *prev_fbuf; unsigned char *prev_fbuf;
/** /* Size of previously captured frame (for software monitoring) */
Size of previously captured frame (for software monitoring).
*/
int prev_fsize; int prev_fsize;
/** /* Maximum size of USB packet */
Maximum size of USB packet.
*/
int max_packet_size; int max_packet_size;
/** /* PCM playback volume (left and right) */
PCM playback volume (left and right).
*/
int volume_playback[2]; int volume_playback[2];
/** /* PCM monitor volume */
PCM monitor volume.
*/
int volume_monitor; int volume_monitor;
/** /* Volume of impulse response test signal (if zero, test is disabled) */
Volume of impulse response test signal (if zero, test is disabled).
*/
int impulse_volume; int impulse_volume;
/** /* Period of impulse response test signal */
Period of impulse response test signal.
*/
int impulse_period; int impulse_period;
/** /* Counter for impulse response test signal */
Counter for impulse response test signal.
*/
int impulse_count; int impulse_count;
/** /* Several status bits (see LINE6_FLAG_*) */
Several status bits (see LINE6_FLAG_*).
*/
unsigned long flags; unsigned long flags;
}; };
......
...@@ -58,44 +58,28 @@ enum { ...@@ -58,44 +58,28 @@ enum {
}; };
struct usb_line6_pod { struct usb_line6_pod {
/** /* Generic Line 6 USB data */
Generic Line 6 USB data.
*/
struct usb_line6 line6; struct usb_line6 line6;
/** /* Instrument monitor level */
Instrument monitor level.
*/
int monitor_level; int monitor_level;
/** /* Timer for device initialization */
Timer for device initializaton.
*/
struct timer_list startup_timer; struct timer_list startup_timer;
/** /* Work handler for device initialization */
Work handler for device initializaton.
*/
struct work_struct startup_work; struct work_struct startup_work;
/** /* Current progress in startup procedure */
Current progress in startup procedure.
*/
int startup_progress; int startup_progress;
/** /* Serial number of device */
Serial number of device.
*/
int serial_number; int serial_number;
/** /* Firmware version (x 100) */
Firmware version (x 100).
*/
int firmware_version; int firmware_version;
/** /* Device ID */
Device ID.
*/
int device_id; int device_id;
}; };
......
...@@ -27,9 +27,7 @@ enum { ...@@ -27,9 +27,7 @@ enum {
}; };
struct usb_line6_podhd { struct usb_line6_podhd {
/** /* Generic Line 6 USB data */
Generic Line 6 USB data.
*/
struct usb_line6 line6; struct usb_line6 line6;
}; };
......
...@@ -43,34 +43,22 @@ struct toneport_led { ...@@ -43,34 +43,22 @@ struct toneport_led {
}; };
struct usb_line6_toneport { struct usb_line6_toneport {
/** /* Generic Line 6 USB data */
Generic Line 6 USB data.
*/
struct usb_line6 line6; struct usb_line6 line6;
/** /* Source selector */
Source selector.
*/
int source; int source;
/** /* Serial number of device */
Serial number of device.
*/
int serial_number; int serial_number;
/** /* Firmware version (x 100) */
Firmware version (x 100).
*/
int firmware_version; int firmware_version;
/** /* Timer for delayed PCM startup */
Timer for delayed PCM startup.
*/
struct timer_list timer; struct timer_list timer;
/** /* Device type */
Device type.
*/
enum line6_device_type type; enum line6_device_type type;
/* LED instances */ /* LED instances */
......
...@@ -42,30 +42,20 @@ enum { ...@@ -42,30 +42,20 @@ enum {
}; };
struct usb_line6_variax { struct usb_line6_variax {
/** /* Generic Line 6 USB data */
Generic Line 6 USB data.
*/
struct usb_line6 line6; struct usb_line6 line6;
/** /* Buffer for activation code */
Buffer for activation code.
*/
unsigned char *buffer_activate; unsigned char *buffer_activate;
/** /* Handler for device initialization */
Handler for device initializaton.
*/
struct work_struct startup_work; struct work_struct startup_work;
/** /* Timers for device initialization */
Timers for device initializaton.
*/
struct timer_list startup_timer1; struct timer_list startup_timer1;
struct timer_list startup_timer2; struct timer_list startup_timer2;
/** /* Current progress in startup procedure */
Current progress in startup procedure.
*/
int startup_progress; int startup_progress;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment