← Documents Documentation/sound/cards/serial-u16550.rst GitHub 원문 ↗

Linux 6.18.37 · Sound

직렬 UART 16450/16550 MIDI 드라이버

16450/16550 UART를 사용하는 Roland SoundCanvas, Midiator MS-124T/W와 범용 MIDI 어댑터 모드, F5 NN stream 선택 및 전송률 제약을 설명합니다.

Source pathDocumentation/sound/cards/serial-u16550.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

serial-u16550.rst:1-93

16450/16550 UART를 사용하는 Roland SoundCanvas, Midiator MS-124T/W와 범용 MIDI 어댑터 모드, F5 NN stream 선택 및 전송률 제약을 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 ===================================
2 Serial UART 16450/16550 MIDI driver
3 ===================================
4
5 The adaptor module parameter allows you to select either:
6
7 * 0 - Roland Soundcanvas support (default)
8 * 1 - Midiator MS-124T support (1)
9 * 2 - Midiator MS-124W S/A mode (2)
10 * 3 - MS-124W M/B mode support (3)
11 * 4 - Generic device with multiple input support (4)
12
13 For the Midiator MS-124W, you must set the physical M-S and A-B
14 switches on the Midiator to match the driver mode you select.
15
16 In Roland Soundcanvas mode, multiple ALSA raw MIDI substreams are supported
17 (midiCnD0-midiCnD15). Whenever you write to a different substream, the driver
18 sends the nonstandard MIDI command sequence F5 NN, where NN is the substream
19 number plus 1. Roland modules use this command to switch between different
20 "parts", so this feature lets you treat each part as a distinct raw MIDI
21 substream. The driver provides no way to send F5 00 (no selection) or to not
22 send the F5 NN command sequence at all; perhaps it ought to.
23
24 Usage example for simple serial converter:
25 ::
26
27 /sbin/setserial /dev/ttyS0 uart none
28 /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 speed=115200
29
30 Usage example for Roland SoundCanvas with 4 MIDI ports:
31 ::
32
33 /sbin/setserial /dev/ttyS0 uart none
34 /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 outs=4
35
36 In MS-124T mode, one raw MIDI substream is supported (midiCnD0); the outs
37 module parameter is automatically set to 1. The driver sends the same data to
38 all four MIDI Out connectors. Set the A-B switch and the speed module
39 parameter to match (A=19200, B=9600).
40
41 Usage example for MS-124T, with A-B switch in A position:
42 ::
43
44 /sbin/setserial /dev/ttyS0 uart none
45 /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=1 \
46 speed=19200
47
48 In MS-124W S/A mode, one raw MIDI substream is supported (midiCnD0);
49 the outs module parameter is automatically set to 1. The driver sends
50 the same data to all four MIDI Out connectors at full MIDI speed.
51
52 Usage example for S/A mode:
53 ::
54
55 /sbin/setserial /dev/ttyS0 uart none
56 /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=2
57
58 In MS-124W M/B mode, the driver supports 16 ALSA raw MIDI substreams;
59 the outs module parameter is automatically set to 16. The substream
60 number gives a bitmask of which MIDI Out connectors the data should be
61 sent to, with midiCnD1 sending to Out 1, midiCnD2 to Out 2, midiCnD4 to
62 Out 3, and midiCnD8 to Out 4. Thus midiCnD15 sends the data to all 4 ports.
63 As a special case, midiCnD0 also sends to all ports, since it is not useful
64 to send the data to no ports. M/B mode has extra overhead to select the MIDI
65 Out for each byte, so the aggregate data rate across all four MIDI Outs is
66 at most one byte every 520 us, as compared with the full MIDI data rate of
67 one byte every 320 us per port.
68
69 Usage example for M/B mode:
70 ::
71
72 /sbin/setserial /dev/ttyS0 uart none
73 /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=3
74
75 The MS-124W hardware's M/A mode is currently not supported. This mode allows
76 the MIDI Outs to act independently at double the aggregate throughput of M/B,
77 but does not allow sending the same byte simultaneously to multiple MIDI Outs.
78 The M/A protocol requires the driver to twiddle the modem control lines under
79 timing constraints, so it would be a bit more complicated to implement than
80 the other modes.
81
82 Midiator models other than MS-124W and MS-124T are currently not supported.
83 Note that the suffix letter is significant; the MS-124 and MS-124B are not
84 compatible, nor are the other known models MS-101, MS-101B, MS-103, and MS-114.
85 I do have documentation (tim.mann@compaq.com) that partially covers these models,
86 but no units to experiment with. The MS-124W support is tested with a real unit.
87 The MS-124T support is untested, but should work.
88
89 The Generic driver supports multiple input and output substreams over a single
90 serial port. Similar to Roland Soundcanvas mode, F5 NN is used to select the
91 appropriate input or output stream (depending on the data direction).
92 Additionally, the CTS signal is used to regulate the data flow. The number of
93 inputs is specified by the ins parameter.
94

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

어댑터 모드와 Roland SoundCanvas

1-23

`snd-serial-u16550` 드라이버의 `adaptor` 모듈 매개변수는 연결할 직렬 MIDI 어댑터의 동작 방식을 선택한다. 기본값 0은 Roland SoundCanvas이고, 1~4는 Midiator와 범용 장치 모드다.

serial-u16550 어댑터 모드
모드
0Roland SoundCanvas (기본값)
1Midiator MS-124T
2Midiator MS-124W S/A
3Midiator MS-124W M/B
4여러 입력을 지원하는 범용 장치

`adaptor` 값과 지원 방식을 정리한다.

Midiator MS-124W를 사용할 때는 장치의 물리적 `M-S` 및 `A-B` 스위치 위치를 선택한 드라이버 모드와 일치시켜야 한다.

Roland SoundCanvas 모드는 `midiCnD0`부터 `midiCnD15`까지 여러 ALSA raw MIDI substream을 지원한다. 다른 substream에 쓸 때마다 드라이버는 비표준 MIDI 명령 `F5 NN`을 전송하며, `NN`은 substream 번호에 1을 더한 값이다. Roland 모듈은 이 명령으로 서로 다른 part를 선택하므로 각 part를 별도의 raw MIDI substream처럼 다룰 수 있다.

현재 드라이버에는 선택을 해제하는 `F5 00`을 보내거나 `F5 NN` 전송 자체를 끄는 방법이 없다. 원문은 이런 기능이 필요할 수 있다고 지적한다.

===================================
Serial UART 16450/16550 MIDI driver
===================================

The adaptor module parameter allows you to select either:

* 0 - Roland Soundcanvas support (default)
* 1 - Midiator MS-124T support (1)
* 2 - Midiator MS-124W S/A mode (2)
* 3 - MS-124W M/B mode support (3)
* 4 - Generic device with multiple input support (4)

For the Midiator MS-124W, you must set the physical M-S and A-B
switches on the Midiator to match the driver mode you select.

In Roland Soundcanvas mode, multiple ALSA raw MIDI substreams are supported
(midiCnD0-midiCnD15).  Whenever you write to a different substream, the driver
sends the nonstandard MIDI command sequence F5 NN, where NN is the substream
number plus 1.  Roland modules use this command to switch between different
"parts", so this feature lets you treat each part as a distinct raw MIDI
substream. The driver provides no way to send F5 00 (no selection) or to not
send the F5 NN command sequence at all; perhaps it ought to.

직렬 변환기·SoundCanvas·MS-124T 사용법

24-47

단순 직렬 변환기를 사용할 때는 먼저 해당 UART를 일반 직렬 드라이버에서 해제한 뒤 포트 주소, IRQ, 속도를 지정해 모듈을 적재한다.

/sbin/setserial /dev/ttyS0 uart none
/sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 speed=115200

MIDI 포트 4개가 있는 Roland SoundCanvas는 `outs=4`로 출력 수를 지정한다.

/sbin/setserial /dev/ttyS0 uart none
/sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 outs=4

MS-124T 모드에서는 raw MIDI substream 하나(`midiCnD0`)만 지원하고 `outs`는 자동으로 1이 된다. 같은 데이터를 네 MIDI Out 커넥터 모두에 전송한다. 물리적 A-B 스위치와 `speed` 값을 맞춰야 하며 A는 19200, B는 9600이다.

A-B 스위치를 A에 둔 MS-124T의 예는 다음과 같다.

/sbin/setserial /dev/ttyS0 uart none
/sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=1 \
+        speed=19200
Usage example for simple serial converter:
::

        /sbin/setserial /dev/ttyS0 uart none
        /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 speed=115200

Usage example for Roland SoundCanvas with 4 MIDI ports:
::

        /sbin/setserial /dev/ttyS0 uart none
        /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 outs=4

In MS-124T mode, one raw MIDI substream is supported (midiCnD0); the outs
module parameter is automatically set to 1. The driver sends the same data to
all four MIDI Out connectors.  Set the A-B switch and the speed module
parameter to match (A=19200, B=9600).

Usage example for MS-124T, with A-B switch in A position:
::

        /sbin/setserial /dev/ttyS0 uart none
        /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=1 \
                        speed=19200

MS-124W S/A와 M/B 모드

48-68

MS-124W S/A 모드는 raw MIDI substream 하나(`midiCnD0`)를 지원하고 `outs`를 자동으로 1로 설정한다. 동일한 데이터를 최대 MIDI 속도로 네 MIDI Out 커넥터 모두에 보낸다.

/sbin/setserial /dev/ttyS0 uart none
/sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=2

MS-124W M/B 모드는 16개 ALSA raw MIDI substream을 지원하며 `outs`는 자동으로 16이 된다. substream 번호를 출력 포트 bitmask로 사용한다. `midiCnD1`, `D2`, `D4`, `D8`은 각각 Out 1~4를 뜻하고 `midiCnD15`는 네 포트 모두를 선택한다. 아무 포트에도 보내지 않는 경우는 유용하지 않으므로 `midiCnD0`도 특별히 모든 포트로 보낸다.

MS-124W M/B 출력 bitmask
Substream출력
midiCnD1Out 1
midiCnD2Out 2
midiCnD4Out 3
midiCnD8Out 4
midiCnD15Out 1~4
midiCnD0특수 처리로 Out 1~4

substream 번호의 bit가 MIDI Out 커넥터를 선택한다.

M/B 모드는 각 바이트마다 MIDI Out을 선택하는 추가 부담이 있다. 따라서 네 출력 전체의 합산 전송률은 최대 520us마다 1바이트이며, 일반 최대 MIDI 속도인 포트별 320us마다 1바이트보다 느리다.

In MS-124W S/A mode, one raw MIDI substream is supported (midiCnD0);
the outs module parameter is automatically set to 1. The driver sends
the same data to all four MIDI Out connectors at full MIDI speed.

Usage example for S/A mode:
::

        /sbin/setserial /dev/ttyS0 uart none
        /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=2

In MS-124W M/B mode, the driver supports 16 ALSA raw MIDI substreams;
the outs module parameter is automatically set to 16.  The substream
number gives a bitmask of which MIDI Out connectors the data should be
sent to, with midiCnD1 sending to Out 1, midiCnD2 to Out 2, midiCnD4 to
Out 3, and midiCnD8 to Out 4.  Thus midiCnD15 sends the data to all 4 ports.
As a special case, midiCnD0 also sends to all ports, since it is not useful
to send the data to no ports.  M/B mode has extra overhead to select the MIDI
Out for each byte, so the aggregate data rate across all four MIDI Outs is
at most one byte every 520 us, as compared with the full MIDI data rate of
one byte every 320 us per port.

M/B 사용법, 미지원 모드와 범용 장치

69-93

M/B 모드 적재 예는 다음과 같다.

/sbin/setserial /dev/ttyS0 uart none
/sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=3

MS-124W 하드웨어의 M/A 모드는 현재 지원하지 않는다. M/A는 각 MIDI Out을 독립적으로 동작시키며 M/B보다 합산 처리량이 두 배지만, 같은 바이트를 여러 출력에 동시에 보낼 수 없다. 이 protocol은 엄격한 timing 아래 modem control line을 조작해야 하므로 다른 모드보다 구현이 복잡하다.

MS-124W와 MS-124T 외의 Midiator 모델은 지원하지 않는다. 접미 문자는 중요하며 MS-124와 MS-124B는 호환되지 않는다. 알려진 MS-101, MS-101B, MS-103, MS-114도 지원 대상이 아니다. 저자는 일부 문서를 가지고 있지만 시험 장치는 없다고 밝힌다. MS-124W는 실제 장치로 검증했고 MS-124T는 미검증이지만 동작할 것으로 예상한다.

범용 드라이버 모드는 단일 직렬 포트에서 여러 입력·출력 substream을 지원한다. Roland SoundCanvas 모드처럼 데이터 방향에 따라 알맞은 입력 또는 출력 stream을 `F5 NN`으로 선택하며, CTS 신호로 데이터 흐름을 조절한다. 입력 수는 `ins` 매개변수로 지정한다.

Usage example for M/B mode:
::

        /sbin/setserial /dev/ttyS0 uart none
        /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=3

The MS-124W hardware's M/A mode is currently not supported. This mode allows
the MIDI Outs to act independently at double the aggregate throughput of M/B,
but does not allow sending the same byte simultaneously to multiple MIDI Outs. 
The M/A protocol requires the driver to twiddle the modem control lines under
timing constraints, so it would be a bit more complicated to implement than
the other modes.

Midiator models other than MS-124W and MS-124T are currently not supported. 
Note that the suffix letter is significant; the MS-124 and MS-124B are not
compatible, nor are the other known models MS-101, MS-101B, MS-103, and MS-114.
I do have documentation (tim.mann@compaq.com) that partially covers these models,
but no units to experiment with.  The MS-124W support is tested with a real unit.
The MS-124T support is untested, but should work.

The Generic driver supports multiple input and output substreams over a single
serial port.  Similar to Roland Soundcanvas mode, F5 NN is used to select the
appropriate input or output stream (depending on the data direction).
Additionally, the CTS signal is used to regulate the data flow.  The number of
inputs is specified by the ins parameter.