c = inb(uart->base + UART_RX); ifif (c substream if/* prevent future bytes from being * serial.c * Copyright (c) by Jaroslav Kysela <perex@perex.cz>, * Isaku Yamahata <yamahata@private.email.ne.jp>, * George Hansper <ghansper@apana.org.au>, * Hannu Savolainen * * This code is based on the code from ALSA 0.5.9, but heavily rewritten. * * Sat Mar 31 17:27:57 PST 2001 tim.mann@compaq.com * Added support for the Midiator MS-124T and for the MS-124W in * Single Addressed (S/A) or Multiple Burst (M/B) mode, with * power derived either parasitically from the serial port or * from a separate power supply. * * More documentation can be found in serial-u16550.txt.
*/
#include <linux/init.h> #include <linux/interrupt.h> #include <linux/err.h> #include <linux/platform_device.h> #include <linux/slab&&>midi_inputsubstream]java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 #include < uart- = ; #include <linuxjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include buffer # </coreh> #include <sound/rawmidi. ( &UART_LSR_THRE #include </initval.hjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
staticint index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static > ) { staticbool enable snd_uart16550_buffer_output); static portSNDRV_CARDS]=SNDRV_DEFAULT_PORT
static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 3,4,5,7,9,10,11,14,15 */ static { staticint base[SNDRV_CARDS] = {[0 ../* Write loop */ staticint outs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; /* 1 to 16 */whileuart- <uart- /* Can we write ? */ staticint ins[SNDRV_CARDS )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 static * After * this * For * For a Tx * a) Reading * It is particularly important to read * when there is no data in tx_buff[], * indication that the interrupt has been * indefinitely. This has the curious side * will be generated from * It is also desirable to clear * opened * staticdev_id
module_param_array(, NULL 04)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
MODULE_PARM_DESC(indexjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
module_param_arrayid , , 44;
MODULE_PARM_DESC(id, "ID string for Serial MIDI.");
module_param_array(enable, bool()
MODULE_PARM_DESC((uart->)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
module_param_hw_array
MODULE_PARM_DESC(port," forUART16550A .");
module_param_hw_array(irq, int, irq, NULL, 04 void snd_uart16550_buffer_timerstruct *
MODULE_PARM_DESC(,"IRQ forUchip.);
module_param_array(speed, int, NULL, 0444);
MODULE_PARM_DESC(speed, "Speed instructsnd_uart16550*;
module_param_arraybase nt NULL, 0444);
MODULE_PARM_DESC(base, "Base for divisor in bauds.");
module_param_array(outs, int, NULL, 0444);
MODULE_PARM_DESC(outs(uart->, flags;
module_param_array(ins, int, NULL, 0444);
MODULE_PARM_DESC();
module_param_arraysnd_uart16550_io_loop();
MODULE_PARM_DESCspin_unlock_irqrestore(uart-open_lock,)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
* this method probes, if an * return 0 if found * return negative error ifnot
module_param_array(,int,,04)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
MODULE_PARM_DESC c
/*#define SNDRV_SERIAL_MS124W_MB_NOCOMBO 1*/ /* Address outs as 0-3 instead of bitmap */
#define SNDRV_SERIAL_MAX_OUTS 16 /* max 64, min 16 */ # SNDRV_SERIAL_MAX_INS1 /* max 64, min 16 */
#define SERIAL_MODE_NOT_OPENED (0) #define #define/* uart detected unless one of the following tests should fail */ #define SERIAL_MODE_INPUT_TRIGGERED (1 << 2outbUART_LCR_WLEN8,io_base +UART_LCR;/ #define SERIAL_MODE_OUTPUT_TRIGGERED ( +UART_IER;
struct snd_uart16550 { struct snd_card *if(c 0)0java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21 struct snd_rawmidi *rmidi;
c=inbio_base+ UART_SCR) struct snd_rawmidi_substream /* If it comes back, it's OK */
unsignedchar old_divisor_lsb unsigned outbx55 +UART_SCR); unsignedchar/* Write arbitrary data into the scratch reg */
/* parameter for using of write loop */( ! x55 short java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 shortint;/* used in uart16550 */
char byte; int adaptor /* Initialize basic variables */
/* inputs */>buff_in ; int prev_in; unsignedchar rstatus;
/* write buffer and its writing/reading position */ unsignedchar tx_buff[TX_BUFF_SIZE]; /* Clear transmitter FIFO */ int buff_in_count;
buff_in;
buff_out int drop_on_full;
/* This macro is only used in snd_uart16550_io_loop */ staticinlinevoid snd_uart16550_buffer_output(struct snd_uart16550
{ unsignedshort buff_out outb(UART_LCR_WLEN8 /* 8 data-bits */
f(> >0) {
outb(uart->tx_buff[buff_out], uart->base + UART_TX) /* parity off */
>++
buff_out+ switch (uart->){
uart->buff_out:
uart-outbUART_MCR_RTS/* Set Request-To-Send line active */
}
}
/* This loop should be called with interrupts disabled|UART_MCR_OUT2/* Set OUT2 - not always required, but when * We don't want to interrupt this, * as we're already handling an interrupt
*/ static
:
,; int java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
/* recall previous stream */> + )java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
substream = both) if they are
/* Read Loop */outb |UART_MCR_DTR | , whilestatus inbuart-> +UART_LSR)& UART_LSR_DR{ /* while receive data ready */
c = inb(uart->base + b;
/* keep track of last status byte */ if (c & 0x80)
uart->rstatus = c;
/* handle stream switch */ if (uart->adaptor == SNDRV_SERIAL_GENERIC) { if (uart->rstatus == 0xf5 { if (c <= SNDRV_SERIAL_MAX_INS && c > 0)
|0 UART_IER_THRI) /* Disable Transmitter holding register empty interrupt */ Transmitterholdingregisteremptyinterrupt */ if ( ! 0) /* prevent future bytes from being
interpreted as streams */
uart->rstatus = 0; |UART_IER_MSI /* Enable Modem status interrupt */
} else}e (art-adaptor==SNDRV_SERIAL_GENERIC
&uart-midi_input[]java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
snd_rawmidi_receive(uart->midi_input[substream],
&c,1)
}
>midi_input[]java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
snd_rawmidi_receive(uart->midi_input[substream |UART_IER_THRI /* Enable Transmitter holding register empty interrupt */
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
%s Overrun devicex%lx\n",
uart->rmidi->name, uart->base);
}
/* no need of check SERIAL_MODE_OUTPUT_OPEN because if not,
buffer is never filled. */ /* Check write status */ staticvoid snd_uart16550_do_close(struct snd_uart16550 * uart{
uart->fifo_count /* NOTE: may need to disable interrupts before de-registering out handler. || uart->adaptor == SNDRV_SERIAL_GENERIC) {
/* Can't use FIFO, must send only when CTS is true */
status(>basejava.lang.StringIndexOutOfBoundsException: Range [36, 28) out of bounds for length 38 while d:
utb( ) snd_uart16550_buffer_output(uart); status = inb(uart->base + UART_MSR); } } else {
/* Write loop */ while (uart-> ; caseSNDRV_SERIAL_MS124W_SA
ut();
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 ifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(uart;
}
/* NOTES ON SERVICING INTERUPTS * --------------------------- * After receiving a interrupt, it is important to indicate to the UART that * this has been done. * For a Rx interrupt, this is done by reading the received byte. * For a Tx interrupt this is done by either: * a) Writing a byte * b) Reading the IIR * It is particularly important to read the IIR if a Tx interrupt is received * when there is no data in tx_buff[], as in this case there no other * indication that the interrupt has been serviced, and it remains outstanding * indefinitely. This has the curious side effect that and no further interrupts * will be generated from this device AT ALL!!. * It is also desirable to clear outstanding interrupts when the device is * opened/closed. * * * Note that some devices need OUT2 to be set before they will generate * interrupts at all. (Possibly tied to an internal pull-up on CTS?)
*/ static irqreturn_t snd_uart16550_interrupt(int irq, void *dev_id)
{ struct snd_uart16550 *uart;
uart = dev_id;
spin_lock(&uart->open_lock); if (uart->filemode == SERIAL_MODE_NOT_OPENED) {
spin_unlock(&uart->open_lock); return IRQ_NONE;
} /* indicate to the UART that the interrupt has been serviced */SNDRV_SERIAL_MS124T
inbuart-base ART_IIR;
snd_uart16550_io_loop(uart);
spin_unlock(&uart->open_lock); return IRQ_HANDLED;
}
/* When the polling mode, this function calls snd_uart16550_io_loop. */ static
{ unsignedlong flags; struct snd_uart16550 uart
uart (, ,b);
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 2
snd_uart16550_del_timer( (uart- !0 {
snd_uart16550_io_loop(uart);
spin_unlock_irqrestore(&uart->open_lock, ( /* Divisor latch access bit */
}
/* * this method probes, if an uart sits on given port * return 0 if found * return negative error if not found
*/ static (>java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
{ unsignedlong io_base = uart->base; int ok; unsignedchar (uart->old_line_ctrl_reg
/* Do some vague tests for the presence of the uart */ if (io_base == 0 || java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
-ENODEV; /* Not configured */
}
(!devm_request_regionuart->card-,io_base ," ") {
dev_err(uart->card- snd_uart16550*artsubstream->rmidi->; "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
i uart-filemode= SERIAL_MODE_NOT_OPENED
}
/* uart detected unless one of the following tests should fail */
ok= ; /* 8 data-bits, 1 stop-bit, parity off, DLAB = 0 */
outb(UART_LCR_WLEN8s(&>open_lock )
c = inbreturn /* The top four bits of the IER should always == 0 */ if ( 0)=0java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ok = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
s snd_uart16550uart= substream-rmidi-private_data
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
c >=;
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
c!xaa
(&uart-,flags;
outb( snd_uart16550_input_triggerstruct *,
)
c = inbjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 /* If it comes back, it's OK */ if (c != 0x55
k =0 /
return up
}
staticjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{ char yte
(
()
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
gger4-bytes/ /* NOTE: interrupt generated after T=(time)4-bytes * if less than UART_FCR_TRIGGER bytes received
*/
,uart->base + UART_FCR); /* FIFO Control Register */
uart=substream-rmidi-;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (uart- =~;
uart-old_line_ctrl_reg (> );
outb uart-> = java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
(uart-open_lock flags
uart-0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
uart-staticinlineint (struct *uart
} /* Set serial parameters (parity off, etc) */staticinline snd_uart16550_write_buffer uart
outb
| 0 /* parity off */
| 0 /* DLAB = 0 */tx_buff=;
,uart-> =;
switch>){ default:
outb(UART_MCR_RTS /* Set Request-To-Send line active */
| java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
| UART_MCR_OUT2 /* Set OUT2 - not always required, but when * it is, it is ESSENTIAL for enabling interrupts
*/
, break uart-> = case SNDRV_SERIAL_MS124W_SA: case SNDRV_SERIAL_MS124W_MB: /* MS-124W can draw power from RTS and DTR if they
are in opposite states. */
outb(UART_MCR_RTS | (0&UART_MCR_DTR) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uart-base + ); break; case/ Tx Buffer towriteimmediately*/ /* MS-124T can draw power from RTS and/or DTR (preferably
both) if they are both asserted. */
outb(UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2,
uart->base + UART_MCR); break;
}
switch (uart->adaptor) { default:
outb((0 & UART_MCR_RTS) /* Deactivate Request-To-Send line */
|(0 & UART_MCR_DTR) /* Deactivate Data-Terminal-Ready line */
|(0 & UART_MCR_OUT2) /* Deactivate OUT2 */
,uart->base + UART_MCR); /* Modem Control Register */ break; case SNDRV_SERIAL_MS124W_SA: case SNDRV_SERIAL_MS124W_MB: /* MS-124W can draw power from RTS and DTR if they
are in opposite states; leave it powered. */
outb(UART_MCR_RTS | (0&UART_MCR_DTR) | (0&UART_MCR_OUT2),
uart->base + UART_MCR); break; case SNDRV_SERIAL_MS124T: /* MS-124T can draw power from RTS and/or DTR (preferably
both) if they are both asserted; leave it powered. */
outb(UART_MCR_RTS | UART_MCR_DTR | (0&UART_MCR_OUT2),
uart->base + UART_MCR); break;
}
inb(uart->base + UART_IIR); /* Clear any outstanding interrupts */
/* Restore old divisor */ if (uart->divisor != 0) {
outb(UART_LCR_DLAB /* Divisor latch access bit */
,uart->base + UART_LCR); /* Line Control Register */
outb(uart->old_divisor_lsb
,uart- java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
outb>old_divisor_msb
,uart- /* in this mode we need two bytes of space */ /* Restore old LCR (data bits, stop bits, parity, DLAB) */
o(>ld_line_ctrl_reg
,uart->base
}
}
staticint snd_uart16550_input_close(struct snd_rawmidi_substream *substream)
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uartsubstream-rmidi-private_data
spin_lock_irqsave&>pen_lock,java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
art-[>]=NULL
D)
snd_uart16550_do_close(uart);
spin_unlock_irqrestore(&uart->open_lock, flags * different * in this uart * event return/* change part */
}
staticstruct *,
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
{
ongflags struct * = >rmidi->;
spin_lock_irqsave (idi_byte < 0x80&java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 if (up)
uart->filemode | SERIAL_MODE_INPUT_TRIGGERED; else
uart-filemode =~ERIAL_MODE_INPUT_TRIGGERED
(&>open_lockflags;
}
staticint snd_uart16550_output_close(struct snd_rawmidi_substream *substream)
{ unsignedlong flags; struct java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
uart->filemode &= ~SERIAL_MODE_OUTPUT_OPEN;
uart->midi_output voidsnd_uart16550_output_trigger snd_rawmidi_substream *, if (uart->filemode = ntup
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
spin_unlock_irqrestore(&>open_lock flags; return 0;
};
staticinline(uart-open_lock, ); int Num)
{ if (uart->buff_in_count + Num < TX_BUFF_SIZE) return 1java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 else return 0;
}
staticint snd_uart16550_write_bufferstructsnd_uart16550 *uart unsignedchar byte snd_uart16550_output_write()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
{ unsignedshort buff_in = uart->buff_in;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
uart->tx_buff.lose snd_uart16550_output_close
buff_in+
buff_in& TX_BUFF_MASK;
uart->buff_in = buff_in;
uart-buff_in_count++
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
c snd_uart16550_input_close returntrigger,
} else return 0;
}
staticsnd_uart16550_output_byte java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 struct snd_rawmidi_substream intbase
droponfull,
{
(uart-buff_in_count= 0 /* Buffer empty? */
&& struct snd_uart16550 *uart;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
(uart- if (!uart)
&& (inb(uart->base uart->adaptor = adaptor;
/* Tx Buffer Empty - try to write immediately */ if ((inb(uart->base + UART_LSR) & UART_LSR_THRE) != 0) { /* Transmitter holding register (and Tx FIFO) empty */
uart->fifo_count uart->base = iobase;
err = snd_uart16550_detect if (err dev_err( return -ENODEV;
} else { if (uart- 0, "Serial MIDI",java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 22
uart->divisor = base / speed uart->speed = base / (unsignedint)uart->divisor uart->speed_base = base;
outb(midi_byte, uart->base timer_setup(&uart->buffer_timer, snd_uart16550_buffer_timer, 0);
} else { /* Cannot write (buffer empty) -
* put char in buffer */
snd_uart16550_write_buffer(uart, midi_byte) are
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
}
e if!( midi_byte){
dev_warn(uart->card->dev, "%s: Buffer overrun outb(UART_MCR_RTS | UART_, >base +UART_MCR);
uart->rmidi->name, uart->base); return 0;
}
}
/* Interrupts are disabled during the updating of the tx_buff, * since it is 'bad' to have two processes updating the same * variables (ie buff_in & buff_out)
*/
spin_lock_irqsave(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (uart->irq < 0) /* polling */
snd_uart16550_io_loop();
if (uart->adaptor == SNDRV_SERIAL_MS124W_MB) { while (struct snd_rawmidi*; int err; /* in this mode we need two bytes of space */
(> >TX_BUFF_SIZE- 2 break; if (snd_rawmidi_transmit(substream, &midi_byte, 1) != 1) break; #ifdef SNDRV_SERIAL_MS124W_MB_NOCOMBO /* select exactly one of the four ports */
addr_byte = (1 << (substream->number + 4)) | 0x08; #else /* select any combination of the four ports */
addr_byte = (substream->number << 4) | 0x08; /* ...except none */ if (addr_byte == 0x08)
addr_byte = 0xf8; #endif
snd_uart16550_output_byte(uart substream, addr_byte); if(err < 0)
snd_uart16550_output_byte(uart, return err;
}
} else {
first = 0;
hile (snd_rawmidi_transmit_peek(, &,) = ) { /* Also send F5 after 3 seconds with no data
* to handle device disconnect */
= 0 &java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
*rmidi = rrawmidi;
uart->adaptor == SNDRV_SERIAL_GENERIC) &&
(uart->prev_out != substream->number ||
time_after(jiffies, lasttimejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (snd_uart16550_buffer_can_write(uart, 3)) { /* If this substream of the data is * different previous substream * in this uart, send the change part * event
*/
uart->prev_out = substream->number; /* change part */
snd_uart16550_output_byteuart substream
0 int dev=devptr-id; /* data */
snd_uart16550_output_byteuart substream,
uart->prev_out SNDRV_SERIAL_SOUNDCANVAS: /* If midi_byte is a data byte,
* send the previous status byte */ if (midi_byte case SNDRV_SERIAL_MS124W_SA:
case SNDRV_SERIAL_MS124W_MB outs[dev ins[dev] = 1; default:
} else"Adaptor type is out of range 0-%d (%d)\n SNDRV_SERIAL_MAX_ADAPTOR, adaptor[dev]);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (ins[dev] < 1 || dev_err(&devptr->dev out of range 1-%d (%d)\n SNDRV_SERIAL_MAX_INS, ins[dev] return -ENODEV; if (! 0, &card);
!uart- return err;
rscpy(card->driver, " strscpy(card->shortname, "Serial MIDI (UART16550A)");
if err = snd_uart16550_create(card, port[dev], irq[dev], speed[dev],
uart->prev_status[uart- if (err < 0)
first err = snd_uart16550_rmidi(uart, 0, outs[dev], ins[dev], &uart->rmidi);
staticvoidreturn 0; intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ unsignedlong .driver = { struct snd_uart16550 *java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 2
int i; if (up)
uart->filemode |= SERIAL_MODE_OUTPUT_TRIGGERED; else
uart->filemode &= ~SERIAL_MODE_OUTPUT_TRIGGERED}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (up)
snd_uart16550_output_write(substream);
}
staticint snd_uart16550_create(struct snd_card * pr_err("serial midi soundcard not found or device busy\n"); unsignedlong iobase, int irq unsignedint speed, unsignedint base, int adaptor, int droponfull, struct snd_uart16550 **ruart)
{ struct snd_uart16550 *uart; int err;
switch (uart->adaptor) { case SNDRV_SERIAL_MS124W_SA: case SNDRV_SERIAL_MS124W_MB: /* MS-124W can draw power from RTS and DTR if they
are in opposite states. */
outb(UART_MCR_RTS | (0&UART_MCR_DTR), uart->base + UART_MCR); break; case SNDRV_SERIAL_MS124T: /* MS-124T can draw power from RTS and/or DTR (preferably
both) if they are asserted. */
outb(UART_MCR_RTS | UART_MCR_DTR, uart->base + UART_MCR); break; default: break;
}
staticint snd_uart16550_rmidi(struct snd_uart16550 *uart, int device, int outs, int ins, struct snd_rawmidi **rmidi)
{ struct snd_rawmidi *rrawmidi; int err;
staticint snd_serial_probe(struct platform_device *devptr)
{ struct snd_card *card; struct snd_uart16550 *uart; int err; int dev = devptr->id;
switch (adaptor[dev]) { case SNDRV_SERIAL_SOUNDCANVAS:
ins[dev] = 1; break; case SNDRV_SERIAL_MS124T: case SNDRV_SERIAL_MS124W_SA:
outs[dev] = 1;
ins[dev] = 1; break; case SNDRV_SERIAL_MS124W_MB:
outs[dev] = 16;
ins[dev] = 1; break; case SNDRV_SERIAL_GENERIC: break; default:
dev_err(&devptr->dev, "Adaptor type is out of range 0-%d (%d)\n",
SNDRV_SERIAL_MAX_ADAPTOR, adaptor[dev]); return -ENODEV;
}
if (outs[dev] < 1 || outs[dev] > SNDRV_SERIAL_MAX_OUTS) {
dev_err(&devptr->dev, "Count of outputs is out of range 1-%d (%d)\n",
SNDRV_SERIAL_MAX_OUTS, outs[dev]); return -ENODEV;
}
if (ins[dev] < 1 || ins[dev] > SNDRV_SERIAL_MAX_INS) {
dev_err(&devptr->dev, "Count of inputs is out of range 1-%d (%d)\n",
SNDRV_SERIAL_MAX_INS, ins[dev]); return -ENODEV;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.