diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-05-23 07:24:30 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-06-22 15:33:56 -0400 |
commit | 302e4c2f9e2b9f07c69649782330a61c60001ac4 (patch) | |
tree | 406d44e355f502ac5e7ee584a28d725c6e7c8a94 /Documentation/sound | |
parent | 140432fd2fbe68d59fe6fcddbcd4bcd0f84e951a (diff) |
[ALSA] Change an arugment of snd_mpu401_uart_new() to bit flags
Change the 5th argument of snd_mpu401_uart_new() to bit flags
instead of a boolean. The argument takes bits that consist of
MPU401_INFO_XXX flags.
The callers that used the value 1 there are replaced with
MPU401_INFO_INTEGRATED.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/sound')
-rw-r--r-- | Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 23c6c7cde4e6..635cbb94357c 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -4215,7 +4215,7 @@ struct _snd_pcm_runtime { | |||
4215 | <programlisting> | 4215 | <programlisting> |
4216 | <![CDATA[ | 4216 | <![CDATA[ |
4217 | struct snd_rawmidi *rmidi; | 4217 | struct snd_rawmidi *rmidi; |
4218 | snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, integrated, | 4218 | snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, info_flags, |
4219 | irq, irq_flags, &rmidi); | 4219 | irq, irq_flags, &rmidi); |
4220 | ]]> | 4220 | ]]> |
4221 | </programlisting> | 4221 | </programlisting> |
@@ -4242,15 +4242,36 @@ struct _snd_pcm_runtime { | |||
4242 | </para> | 4242 | </para> |
4243 | 4243 | ||
4244 | <para> | 4244 | <para> |
4245 | The 5th argument is bitflags for additional information. | ||
4245 | When the i/o port address above is a part of the PCI i/o | 4246 | When the i/o port address above is a part of the PCI i/o |
4246 | region, the MPU401 i/o port might have been already allocated | 4247 | region, the MPU401 i/o port might have been already allocated |
4247 | (reserved) by the driver itself. In such a case, pass non-zero | 4248 | (reserved) by the driver itself. In such a case, pass a bit flag |
4248 | to the 5th argument | 4249 | <constant>MPU401_INFO_INTEGRATED</constant>, |
4249 | (<parameter>integrated</parameter>). Otherwise, pass 0 to it, | ||
4250 | and | 4250 | and |
4251 | the mpu401-uart layer will allocate the i/o ports by itself. | 4251 | the mpu401-uart layer will allocate the i/o ports by itself. |
4252 | </para> | 4252 | </para> |
4253 | 4253 | ||
4254 | <para> | ||
4255 | When the controller supports only the input or output MIDI stream, | ||
4256 | pass <constant>MPU401_INFO_INPUT</constant> or | ||
4257 | <constant>MPU401_INFO_OUTPUT</constant> bitflag, respectively. | ||
4258 | Then the rawmidi instance is created as a single stream. | ||
4259 | </para> | ||
4260 | |||
4261 | <para> | ||
4262 | <constant>MPU401_INFO_MMIO</constant> bitflag is used to change | ||
4263 | the access method to MMIO (via readb and writeb) instead of | ||
4264 | iob and outb. In this case, you have to pass the iomapped address | ||
4265 | to <function>snd_mpu401_uart_new()</function>. | ||
4266 | </para> | ||
4267 | |||
4268 | <para> | ||
4269 | When <constant>MPU401_INFO_TX_IRQ</constant> is set, the output | ||
4270 | stream isn't checked in the default interrupt handler. The driver | ||
4271 | needs to call <function>snd_mpu401_uart_interrupt_tx()</function> | ||
4272 | by itself to start processing the output stream in irq handler. | ||
4273 | </para> | ||
4274 | |||
4254 | <para> | 4275 | <para> |
4255 | Usually, the port address corresponds to the command port and | 4276 | Usually, the port address corresponds to the command port and |
4256 | port + 1 corresponds to the data port. If not, you may change | 4277 | port + 1 corresponds to the data port. If not, you may change |