2005-01-15 18:19:51 +03:00
|
|
|
/* $NetBSD: cmpcivar.h,v 1.8 2005/01/15 15:19:52 kent Exp $ */
|
2000-05-01 01:59:58 +04:00
|
|
|
|
|
|
|
/*
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
|
2000-05-01 01:59:58 +04:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
2003-12-04 16:57:30 +03:00
|
|
|
* by Takuya SHIOZAKI <tshiozak@NetBSD.org> .
|
2000-05-01 01:59:58 +04:00
|
|
|
*
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
* by ITOH Yasufumi.
|
|
|
|
*
|
2000-05-01 01:59:58 +04:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* C-Media CMI8x38 Audio Chip Support */
|
|
|
|
|
|
|
|
#ifndef _DEV_PCI_CMPCIVAR_H_
|
|
|
|
#define _DEV_PCI_CMPCIVAR_H_ (1)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* DMA pool
|
|
|
|
*/
|
|
|
|
struct cmpci_dmanode {
|
2001-02-12 21:47:12 +03:00
|
|
|
bus_dma_tag_t cd_tag;
|
|
|
|
int cd_nsegs;
|
|
|
|
bus_dma_segment_t cd_segs[1];
|
|
|
|
bus_dmamap_t cd_map;
|
|
|
|
caddr_t cd_addr;
|
|
|
|
size_t cd_size;
|
|
|
|
struct cmpci_dmanode *cd_next;
|
2000-05-01 01:59:58 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct cmpci_dmanode *cmpci_dmapool_t;
|
|
|
|
#define KVADDR(dma) ((void *)(dma)->cd_addr)
|
|
|
|
#define DMAADDR(dma) ((dma)->cd_map->dm_segs[0].ds_addr)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
* Mixer device
|
|
|
|
*
|
|
|
|
* Note that cmpci_query_devinfo() is optimized depending on
|
|
|
|
* the order of this. Be careful if you change the values.
|
2000-05-01 01:59:58 +04:00
|
|
|
*/
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
#define CMPCI_DAC_VOL 0 /* inputs.dac */
|
|
|
|
#define CMPCI_FM_VOL 1 /* inputs.fmsynth */
|
|
|
|
#define CMPCI_CD_VOL 2 /* inputs.cd */
|
|
|
|
#define CMPCI_LINE_IN_VOL 3 /* inputs.line */
|
|
|
|
#define CMPCI_AUX_IN_VOL 4 /* inputs.aux */
|
|
|
|
#define CMPCI_MIC_VOL 5 /* inputs.mic */
|
|
|
|
|
|
|
|
#define CMPCI_DAC_MUTE 6 /* inputs.dac.mute */
|
|
|
|
#define CMPCI_FM_MUTE 7 /* inputs.fmsynth.mute */
|
|
|
|
#define CMPCI_CD_MUTE 8 /* inputs.cd.mute */
|
|
|
|
#define CMPCI_LINE_IN_MUTE 9 /* inputs.line.mute */
|
|
|
|
#define CMPCI_AUX_IN_MUTE 10 /* inputs.aux.mute */
|
|
|
|
#define CMPCI_MIC_MUTE 11 /* inputs.mic.mute */
|
|
|
|
|
|
|
|
#define CMPCI_MIC_PREAMP 12 /* inputs.mic.preamp */
|
|
|
|
#define CMPCI_PCSPEAKER 13 /* inputs.speaker */
|
|
|
|
|
|
|
|
#define CMPCI_RECORD_SOURCE 14 /* record.source */
|
|
|
|
#define CMPCI_MIC_RECVOL 15 /* record.mic */
|
|
|
|
|
|
|
|
#define CMPCI_PLAYBACK_MODE 16 /* playback.mode */
|
|
|
|
#define CMPCI_SPDIF_IN_SELECT 17 /* spdif.input */
|
|
|
|
#define CMPCI_SPDIF_IN_PHASE 18 /* spdif.input.phase */
|
|
|
|
#define CMPCI_SPDIF_LOOP 19 /* spdif.output */
|
|
|
|
#define CMPCI_SPDIF_OUT_PLAYBACK 20 /* spdif.output.playback */
|
|
|
|
#define CMPCI_SPDIF_OUT_VOLTAGE 21 /* spdif.output.voltage */
|
|
|
|
#define CMPCI_MONITOR_DAC 22 /* spdif.monitor */
|
|
|
|
|
|
|
|
#define CMPCI_MASTER_VOL 23 /* outputs.master */
|
|
|
|
#define CMPCI_REAR 24 /* outputs.rear */
|
|
|
|
#define CMPCI_INDIVIDUAL 25 /* outputs.rear.individual */
|
|
|
|
#define CMPCI_REVERSE 26 /* outputs.rear.reverse */
|
|
|
|
#define CMPCI_SURROUND 27 /* outputs.surround */
|
|
|
|
|
|
|
|
#define CMPCI_NDEVS 28
|
|
|
|
|
|
|
|
#define CMPCI_INPUT_CLASS 28
|
|
|
|
#define CMPCI_OUTPUT_CLASS 29
|
|
|
|
#define CMPCI_RECORD_CLASS 30
|
|
|
|
#define CMPCI_PLAYBACK_CLASS 31
|
|
|
|
#define CMPCI_SPDIF_CLASS 32
|
|
|
|
|
2000-05-01 01:59:58 +04:00
|
|
|
#define CmpciNspdif "spdif"
|
2001-02-12 21:47:12 +03:00
|
|
|
#define CmpciCspdif "spdif"
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
#define CmpciNspdin "spdin"
|
|
|
|
#define CmpciNspdin1 "spdin1"
|
|
|
|
#define CmpciNspdin2 "spdin2"
|
|
|
|
#define CmpciNspdout "spdout"
|
|
|
|
#define CmpciNplayback "playback"
|
|
|
|
#define CmpciCplayback "playback"
|
2001-02-12 21:47:12 +03:00
|
|
|
#define CmpciNlegacy "legacy"
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
#define CmpciNvoltage "voltage"
|
|
|
|
#define CmpciNphase "phase"
|
2001-02-12 21:47:12 +03:00
|
|
|
#define CmpciNpositive "positive"
|
|
|
|
#define CmpciNnegative "negative"
|
|
|
|
#define CmpciNrear "rear"
|
|
|
|
#define CmpciNindividual "individual"
|
|
|
|
#define CmpciNreverse "reverse"
|
|
|
|
#define CmpciNhigh_v "5V"
|
2003-11-22 19:48:14 +03:00
|
|
|
#define CmpciNlow_v "0.5V"
|
2001-02-12 21:47:12 +03:00
|
|
|
#define CmpciNsurround "surround"
|
2000-05-01 01:59:58 +04:00
|
|
|
|
2004-11-10 19:39:04 +03:00
|
|
|
/* record.source bitmap (see cmpci_set_in_ports()) */
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
#define CMPCI_RECORD_SOURCE_MIC CMPCI_SB16_MIXER_MIC_SRC /* mic */
|
|
|
|
#define CMPCI_RECORD_SOURCE_CD CMPCI_SB16_MIXER_CD_SRC_R /* cd */
|
|
|
|
#define CMPCI_RECORD_SOURCE_LINE_IN CMPCI_SB16_MIXER_LINE_SRC_R /* line */
|
|
|
|
#define CMPCI_RECORD_SOURCE_AUX_IN (1 << 8) /* aux */
|
|
|
|
#define CMPCI_RECORD_SOURCE_WAVE (1 << 9) /* wave */
|
|
|
|
#define CMPCI_RECORD_SOURCE_FM CMPCI_SB16_MIXER_FM_SRC_R /* fmsynth*/
|
|
|
|
#define CMPCI_RECORD_SOURCE_SPDIF (1 << 10) /* spdif */
|
|
|
|
|
|
|
|
/* playback.mode */
|
|
|
|
#define CMPCI_PLAYBACK_MODE_WAVE 0 /* dac */
|
|
|
|
#define CMPCI_PLAYBACK_MODE_SPDIF 1 /* spdif */
|
|
|
|
|
|
|
|
/* spdif.input */
|
|
|
|
#define CMPCI_SPDIFIN_SPDIFIN2 0x01
|
|
|
|
#define CMPCI_SPDIFIN_SPDIFOUT 0x02
|
|
|
|
#define CMPCI_SPDIF_IN_SPDIN1 0 /* spdin1 */
|
|
|
|
#define CMPCI_SPDIF_IN_SPDIN2 CMPCI_SPDIFIN_SPDIFIN2 /* spdin2 */
|
|
|
|
#define CMPCI_SPDIF_IN_SPDOUT (CMPCI_SPDIFIN_SPDIFIN2|CMPCI_SPDIFIN_SPDIFOUT)
|
|
|
|
/* spdout */
|
|
|
|
/* spdif.input.phase */
|
|
|
|
#define CMPCI_SPDIF_IN_PHASE_POSITIVE 0 /* positive */
|
|
|
|
#define CMPCI_SPDIF_IN_PHASE_NEGATIVE 1 /* negative */
|
|
|
|
|
|
|
|
/* spdif.output */
|
|
|
|
#define CMPCI_SPDIF_LOOP_OFF 0 /* playback */
|
|
|
|
#define CMPCI_SPDIF_LOOP_ON 1 /* spdin */
|
|
|
|
|
|
|
|
/* spdif.output.playback */
|
|
|
|
#define CMPCI_SPDIF_OUT_PLAYBACK_WAVE 0 /* wave */
|
|
|
|
#define CMPCI_SPDIF_OUT_PLAYBACK_LEGACY 1 /* legacy */
|
|
|
|
|
|
|
|
/* spdif.output.voltage */
|
2003-11-22 19:48:14 +03:00
|
|
|
#define CMPCI_SPDIF_OUT_VOLTAGE_HIGH 0 /* 5V */
|
|
|
|
#define CMPCI_SPDIF_OUT_VOLTAGE_LOW 1 /* 0.5V */
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
|
|
|
|
/* spdif.monitor */
|
|
|
|
#define CMPCI_MONDAC_ENABLE 0x01
|
|
|
|
#define CMPCI_MONDAC_SPDOUT 0x02
|
|
|
|
#define CMPCI_MONITOR_DAC_OFF 0 /* off */
|
|
|
|
#define CMPCI_MONITOR_DAC_SPDIN CMPCI_MONDAC_ENABLE /* spdin */
|
|
|
|
#define CMPCI_MONITOR_DAC_SPDOUT (CMPCI_MONDAC_ENABLE | CMPCI_MONDAC_SPDOUT)
|
|
|
|
/* spdout */
|
2000-05-01 01:59:58 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* softc
|
|
|
|
*/
|
|
|
|
struct cmpci_softc {
|
2001-02-12 21:47:12 +03:00
|
|
|
struct device sc_dev;
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
|
2000-05-01 01:59:58 +04:00
|
|
|
/* model/rev */
|
2001-02-12 21:47:12 +03:00
|
|
|
uint32_t sc_id;
|
|
|
|
uint32_t sc_class;
|
|
|
|
uint32_t sc_capable;
|
|
|
|
#define CMPCI_CAP_SPDIN 0x00000001
|
|
|
|
#define CMPCI_CAP_SPDOUT 0x00000002
|
|
|
|
#define CMPCI_CAP_SPDLOOP 0x00000004
|
|
|
|
#define CMPCI_CAP_SPDLEGACY 0x00000008
|
|
|
|
#define CMPCI_CAP_SPDIN_MONITOR 0x00000010
|
|
|
|
#define CMPCI_CAP_XSPDOUT 0x00000020
|
|
|
|
#define CMPCI_CAP_SPDOUT_VOLTAGE 0x00000040
|
|
|
|
#define CMPCI_CAP_SPDOUT_48K 0x00000080
|
|
|
|
#define CMPCI_CAP_SURROUND 0x00000100
|
|
|
|
#define CMPCI_CAP_REAR 0x00000200
|
|
|
|
#define CMPCI_CAP_INDIVIDUAL_REAR 0x00000400
|
|
|
|
#define CMPCI_CAP_REVERSE_FR 0x00000800
|
|
|
|
#define CMPCI_CAP_SPDIN_PHASE 0x00001000
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
#define CMPCI_CAP_2ND_SPDIN 0x00002000
|
2001-02-12 21:47:12 +03:00
|
|
|
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
#define CMPCI_CAP_CMI8338 (CMPCI_CAP_SPDIN | CMPCI_CAP_SPDOUT | \
|
2001-02-12 21:47:12 +03:00
|
|
|
CMPCI_CAP_SPDLOOP | CMPCI_CAP_SPDLEGACY)
|
|
|
|
|
|
|
|
#define CMPCI_CAP_CMI8738 (CMPCI_CAP_CMI8338 | \
|
|
|
|
CMPCI_CAP_SPDIN_MONITOR | \
|
|
|
|
CMPCI_CAP_XSPDOUT | \
|
|
|
|
CMPCI_CAP_SPDOUT_VOLTAGE | \
|
|
|
|
CMPCI_CAP_SPDOUT_48K | CMPCI_CAP_SURROUND |\
|
|
|
|
CMPCI_CAP_REAR | \
|
|
|
|
CMPCI_CAP_INDIVIDUAL_REAR | \
|
|
|
|
CMPCI_CAP_REVERSE_FR | \
|
Re-implement the mixer
o Implement SPDIF selection/monitoring function.
Now, say, playback to both analog output and SPDIF is possible.
o Implement support of AUX input, MIC preamp and MIC recording gain.
o L-R selection of record source doesn't seem to work on cmpci.
Therefore, the *.swap mixer functions are and deleted.
o Following SB mixer registers don't exist on cmpci, and they are removed.
input gain, output gain, AGC, equalization (bass, treble)
o Other mixer changes, including
inputs.XXX.mute -> (deleted)
outputs.XXX.mute -> inputs.XXX.mute
inputs.pc_speaker -> inputs.speaker
spdif.* -> reorganized to spdif.input.*, spdif.output.*
o Current status:
I have tested these and confirmed to work fine.
- Output and recording from Line-in, AUX, CD and MIC analog inputs,
- Output and recording from FM synthesizer,
- Output from PC speaker input,
- Output wave playback.
- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
wave to spdin), phase selection, monitoring and recording,
- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
and monitoring.
I haven't tested these but may work.
- SPDIF 48kHz input and output,
- Full-duplex operation,
- Recording wave output.
I don't think these are working.
- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
- Exchanging front and rear outputs,
- Surround.
These are not implemented.
- 4ch / 6ch support,
- Joystick port support.
2001-11-04 09:57:40 +03:00
|
|
|
CMPCI_CAP_SPDIN_PHASE | \
|
|
|
|
CMPCI_CAP_2ND_SPDIN /* XXX 6ch only */)
|
2001-02-12 21:47:12 +03:00
|
|
|
#define CMPCI_ISCAP(sc, name) (sc->sc_capable & CMPCI_CAP_ ## name)
|
2000-05-01 01:59:58 +04:00
|
|
|
|
|
|
|
/* I/O Base device */
|
2001-02-12 21:47:12 +03:00
|
|
|
bus_space_tag_t sc_iot;
|
|
|
|
bus_space_handle_t sc_ioh;
|
2000-05-01 01:59:58 +04:00
|
|
|
|
2001-09-04 17:36:07 +04:00
|
|
|
bus_space_handle_t sc_mpu_ioh;
|
|
|
|
struct device *sc_mpudev;
|
|
|
|
|
2000-05-01 01:59:58 +04:00
|
|
|
/* intr handle */
|
2001-02-12 21:47:12 +03:00
|
|
|
pci_intr_handle_t *sc_ih;
|
2000-05-01 01:59:58 +04:00
|
|
|
|
|
|
|
/* DMA */
|
2001-02-12 21:47:12 +03:00
|
|
|
bus_dma_tag_t sc_dmat;
|
|
|
|
cmpci_dmapool_t sc_dmap;
|
2000-05-01 01:59:58 +04:00
|
|
|
|
|
|
|
/* each channel */
|
|
|
|
struct {
|
2005-01-15 18:19:51 +03:00
|
|
|
void (*intr)(void *);
|
2001-02-12 21:47:12 +03:00
|
|
|
void *intr_arg;
|
|
|
|
int md_divide;
|
2000-05-01 01:59:58 +04:00
|
|
|
} sc_play, sc_rec;
|
|
|
|
|
2003-11-22 19:48:14 +03:00
|
|
|
/* value of CMPCI_REG_MISC register */
|
|
|
|
uint32_t sc_reg_misc;
|
|
|
|
|
2000-05-01 01:59:58 +04:00
|
|
|
/* mixer */
|
2001-02-12 21:47:12 +03:00
|
|
|
uint8_t sc_gain[CMPCI_NDEVS][2];
|
|
|
|
#define CMPCI_LEFT 0
|
|
|
|
#define CMPCI_RIGHT 1
|
|
|
|
#define CMPCI_LR 0
|
|
|
|
uint16_t sc_in_mask;
|
2000-05-01 01:59:58 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _DEV_PCI_CMPCIVAR_H_ */
|
|
|
|
|
|
|
|
/* end of file */
|