diff options
author | James Courtier-Dutton <James@superbug.co.uk> | 2005-10-20 16:57:51 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:19:26 -0500 |
commit | 8a5afd29dc16a9e687f63195cb635ecd611482d0 (patch) | |
tree | dff1950bd5302e5b2752e32075166638be1436dd /sound/pci/ca0106/ca0106.h | |
parent | b0b9811956db489ca43596c37ef2f38582454e51 (diff) |
[ALSA] snd-ca0106: Add midi support.
Modules: PCI drivers,CA0106 driver
Author: Tilman Kranz <tilde@tk-sls.de>
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Diffstat (limited to 'sound/pci/ca0106/ca0106.h')
-rw-r--r-- | sound/pci/ca0106/ca0106.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/sound/pci/ca0106/ca0106.h b/sound/pci/ca0106/ca0106.h index da09cab405a9..9a4b6406f7a5 100644 --- a/sound/pci/ca0106/ca0106.h +++ b/sound/pci/ca0106/ca0106.h | |||
@@ -399,10 +399,24 @@ | |||
399 | #define PLAYBACK_VOLUME2 0x6a /* Playback Analog volume per channel. Does not effect AC3 output */ | 399 | #define PLAYBACK_VOLUME2 0x6a /* Playback Analog volume per channel. Does not effect AC3 output */ |
400 | /* Similar to register 0x66, except that the destination is the I2S mixer instead of the SPDIF mixer. I.E. Outputs to the Analog outputs instead of SPDIF. */ | 400 | /* Similar to register 0x66, except that the destination is the I2S mixer instead of the SPDIF mixer. I.E. Outputs to the Analog outputs instead of SPDIF. */ |
401 | #define UNKNOWN6b 0x6b /* Unknown. Readonly. Default 00400000 00400000 00400000 00400000 */ | 401 | #define UNKNOWN6b 0x6b /* Unknown. Readonly. Default 00400000 00400000 00400000 00400000 */ |
402 | #define UART_A_DATA 0x6c /* Uart, used in setting sample rates, bits per sample etc. */ | 402 | #define MIDI_UART_A_DATA 0x6c /* Midi Uart A Data */ |
403 | #define UART_A_CMD 0x6d /* Uart, used in setting sample rates, bits per sample etc. */ | 403 | #define MIDI_UART_A_CMD 0x6d /* Midi Uart A Command/Status */ |
404 | #define UART_B_DATA 0x6e /* Uart, Unknown. */ | 404 | #define MIDI_UART_B_DATA 0x6e /* Midi Uart B Data (currently unused) */ |
405 | #define UART_B_CMD 0x6f /* Uart, Unknown. */ | 405 | #define MIDI_UART_B_CMD 0x6f /* Midi Uart B Command/Status (currently unused) */ |
406 | |||
407 | /* unique channel identifier for midi->channel */ | ||
408 | |||
409 | #define CA0106_MIDI_CHAN_A 0x1 | ||
410 | #define CA0106_MIDI_CHAN_B 0x2 | ||
411 | |||
412 | /* from mpu401 */ | ||
413 | |||
414 | #define CA0106_MIDI_INPUT_AVAIL 0x80 | ||
415 | #define CA0106_MIDI_OUTPUT_READY 0x40 | ||
416 | #define CA0106_MPU401_RESET 0xff | ||
417 | #define CA0106_MPU401_ENTER_UART 0x3f | ||
418 | #define CA0106_MPU401_ACK 0xfe | ||
419 | |||
406 | #define SAMPLE_RATE_TRACKER_STATUS 0x70 /* Readonly. Default 00108000 00108000 00500000 00500000 */ | 420 | #define SAMPLE_RATE_TRACKER_STATUS 0x70 /* Readonly. Default 00108000 00108000 00500000 00500000 */ |
407 | /* Estimated sample rate [19:0] Relative to 48kHz. 0x8000 = 1.0 | 421 | /* Estimated sample rate [19:0] Relative to 48kHz. 0x8000 = 1.0 |
408 | * Rate Locked [20] | 422 | * Rate Locked [20] |
@@ -538,6 +552,8 @@ | |||
538 | #define CONTROL_CENTER_LFE_CHANNEL 1 | 552 | #define CONTROL_CENTER_LFE_CHANNEL 1 |
539 | #define CONTROL_UNKNOWN_CHANNEL 2 | 553 | #define CONTROL_UNKNOWN_CHANNEL 2 |
540 | 554 | ||
555 | #include "ca_midi.h" | ||
556 | |||
541 | typedef struct snd_ca0106_channel ca0106_channel_t; | 557 | typedef struct snd_ca0106_channel ca0106_channel_t; |
542 | typedef struct snd_ca0106 ca0106_t; | 558 | typedef struct snd_ca0106 ca0106_t; |
543 | typedef struct snd_ca0106_pcm ca0106_pcm_t; | 559 | typedef struct snd_ca0106_pcm ca0106_pcm_t; |
@@ -592,6 +608,9 @@ struct snd_ca0106 { | |||
592 | int capture_mic_line_in; | 608 | int capture_mic_line_in; |
593 | 609 | ||
594 | struct snd_dma_buffer buffer; | 610 | struct snd_dma_buffer buffer; |
611 | |||
612 | ca_midi_t midi; | ||
613 | ca_midi_t midi2; | ||
595 | }; | 614 | }; |
596 | 615 | ||
597 | int __devinit snd_ca0106_mixer(ca0106_t *emu); | 616 | int __devinit snd_ca0106_mixer(ca0106_t *emu); |