FreeBSD kernel sound device code
|
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <dev/sound/pci/allegro_reg.h>
#include <dev/sound/pci/allegro_code.h>
Go to the source code of this file.
Data Structures | |
struct | m3_card_type |
struct | sc_pchinfo |
struct | sc_rchinfo |
struct | sc_info |
Macros | |
#define | M3_MODEL 1 |
#define | M3_DEBUG_LEVEL NONE |
#define | M3_DEBUG(level, _msg) {if ((level) <= M3_DEBUG_LEVEL) {printf _msg;}} |
#define | M3_BUFSIZE_MIN 4096 |
#define | M3_BUFSIZE_MAX 65536 |
#define | M3_BUFSIZE_DEFAULT 4096 |
#define | M3_PCHANS 4 /* create /dev/dsp0.[0-N] to use more than one */ |
#define | M3_RCHANS 1 |
#define | M3_MAXADDR ((1 << 27) - 1) |
#define | M3_DEFAULT_VOL 0x6800 |
#define | M3_LOCK(_sc) snd_mtxlock((_sc)->sc_lock) |
#define | M3_UNLOCK(_sc) snd_mtxunlock((_sc)->sc_lock) |
#define | M3_LOCK_ASSERT(_sc) snd_mtxassert((_sc)->sc_lock) |
#define | m3_rd_1(sc, regno) bus_space_read_1(sc->st, sc->sh, regno) |
#define | m3_rd_2(sc, regno) bus_space_read_2(sc->st, sc->sh, regno) |
#define | m3_rd_4(sc, regno) bus_space_read_4(sc->st, sc->sh, regno) |
#define | m3_wr_1(sc, regno, data) bus_space_write_1(sc->st, sc->sh, regno, data) |
#define | m3_wr_2(sc, regno, data) bus_space_write_2(sc->st, sc->sh, regno, data) |
#define | m3_wr_4(sc, regno, data) bus_space_write_4(sc->st, sc->sh, regno, data) |
#define | m3_rd_assp_code(sc, index) m3_rd_assp(sc, MEMTYPE_INTERNAL_CODE, index) |
#define | m3_wr_assp_code(sc, index, data) m3_wr_assp(sc, MEMTYPE_INTERNAL_CODE, index, data) |
#define | m3_rd_assp_data(sc, index) m3_rd_assp(sc, MEMTYPE_INTERNAL_DATA, index) |
#define | m3_wr_assp_data(sc, index, data) m3_wr_assp(sc, MEMTYPE_INTERNAL_DATA, index, data) |
#define | LO(x) (((x) & 0x0000ffff) ) |
#define | HI(x) (((x) & 0xffff0000) >> 16) |
Enumerations | |
enum | { CHANGE =0 , CALL =1 , INTR =2 , BORING =3 , NONE =-1 } |
enum | { ESS_ALLEGRO_1 , ESS_MAESTRO3 } |
Functions | |
SND_DECLARE_FILE ("$FreeBSD$") | |
static void * | m3_pchan_init (kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int) |
static int | m3_pchan_free (kobj_t, void *) |
static int | m3_pchan_setformat (kobj_t, void *, u_int32_t) |
static u_int32_t | m3_pchan_setspeed (kobj_t, void *, u_int32_t) |
static u_int32_t | m3_pchan_setblocksize (kobj_t, void *, u_int32_t) |
static int | m3_pchan_trigger (kobj_t, void *, int) |
static int | m3_pchan_trigger_locked (kobj_t, void *, int) |
static u_int32_t | m3_pchan_getptr_internal (struct sc_pchinfo *) |
static u_int32_t | m3_pchan_getptr (kobj_t, void *) |
static struct pcmchan_caps * | m3_pchan_getcaps (kobj_t, void *) |
static void * | m3_rchan_init (kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int) |
static int | m3_rchan_free (kobj_t, void *) |
static int | m3_rchan_setformat (kobj_t, void *, u_int32_t) |
static u_int32_t | m3_rchan_setspeed (kobj_t, void *, u_int32_t) |
static u_int32_t | m3_rchan_setblocksize (kobj_t, void *, u_int32_t) |
static int | m3_rchan_trigger (kobj_t, void *, int) |
static int | m3_rchan_trigger_locked (kobj_t, void *, int) |
static u_int32_t | m3_rchan_getptr_internal (struct sc_rchinfo *) |
static u_int32_t | m3_rchan_getptr (kobj_t, void *) |
static struct pcmchan_caps * | m3_rchan_getcaps (kobj_t, void *) |
static int | m3_chan_active (struct sc_info *) |
static u_int32_t | m3_initcd (kobj_t, void *) |
static int | m3_rdcd (kobj_t, void *, int) |
static int | m3_wrcd (kobj_t, void *, int, u_int32_t) |
static void | m3_intr (void *) |
static int | m3_power (struct sc_info *, int) |
static int | m3_init (struct sc_info *) |
static int | m3_uninit (struct sc_info *) |
static u_int8_t | m3_assp_halt (struct sc_info *) |
static void | m3_config (struct sc_info *) |
static void | m3_amp_enable (struct sc_info *) |
static void | m3_enable_ints (struct sc_info *) |
static void | m3_codec_reset (struct sc_info *) |
AC97_DECLARE (m3_codec) | |
CHANNEL_DECLARE (m3_pch) | |
CHANNEL_DECLARE (m3_rch) | |
static __inline u_int16_t | m3_rd_assp (struct sc_info *sc, u_int16_t region, u_int16_t index) |
static __inline void | m3_wr_assp (struct sc_info *sc, u_int16_t region, u_int16_t index, u_int16_t data) |
static __inline int | m3_wait (struct sc_info *sc) |
static int | m3_pci_probe (device_t dev) |
static int | m3_pci_attach (device_t dev) |
static int | m3_pci_detach (device_t dev) |
static int | m3_pci_suspend (device_t dev) |
static int | m3_pci_resume (device_t dev) |
static int | m3_pci_shutdown (device_t dev) |
DRIVER_MODULE (snd_maestro3, pci, m3_driver, pcm_devclass, 0, 0) | |
MODULE_DEPEND (snd_maestro3, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER) | |
MODULE_VERSION (snd_maestro3, 1) | |
Variables | |
static struct m3_card_type | m3_card_types [] |
static kobj_method_t | m3_codec_methods [] |
static u_int32_t | m3_playfmt [] |
static struct pcmchan_caps | m3_playcaps = {8000, 48000, m3_playfmt, 0} |
static kobj_method_t | m3_pch_methods [] |
static u_int32_t | m3_recfmt [] |
static struct pcmchan_caps | m3_reccaps = {8000, 48000, m3_recfmt, 0} |
static kobj_method_t | m3_rch_methods [] |
static device_method_t | m3_methods [] |
static driver_t | m3_driver |
#define HI | ( | x | ) | (((x) & 0xffff0000) >> 16) |
Definition at line 373 of file maestro3.c.
#define LO | ( | x | ) | (((x) & 0x0000ffff) ) |
Definition at line 372 of file maestro3.c.
#define M3_BUFSIZE_DEFAULT 4096 |
Definition at line 99 of file maestro3.c.
#define M3_BUFSIZE_MAX 65536 |
Definition at line 98 of file maestro3.c.
#define M3_BUFSIZE_MIN 4096 |
Definition at line 97 of file maestro3.c.
#define M3_DEBUG | ( | level, | |
_msg | |||
) | {if ((level) <= M3_DEBUG_LEVEL) {printf _msg;}} |
Definition at line 80 of file maestro3.c.
#define M3_DEBUG_LEVEL NONE |
Definition at line 78 of file maestro3.c.
#define M3_DEFAULT_VOL 0x6800 |
Definition at line 103 of file maestro3.c.
#define M3_LOCK | ( | _sc | ) | snd_mtxlock((_sc)->sc_lock) |
Definition at line 164 of file maestro3.c.
#define M3_LOCK_ASSERT | ( | _sc | ) | snd_mtxassert((_sc)->sc_lock) |
Definition at line 166 of file maestro3.c.
#define M3_MAXADDR ((1 << 27) - 1) |
Definition at line 102 of file maestro3.c.
#define M3_MODEL 1 |
Definition at line 67 of file maestro3.c.
#define M3_PCHANS 4 /* create /dev/dsp0.[0-N] to use more than one */ |
Definition at line 100 of file maestro3.c.
#define M3_RCHANS 1 |
Definition at line 101 of file maestro3.c.
Definition at line 272 of file maestro3.c.
Definition at line 273 of file maestro3.c.
Definition at line 274 of file maestro3.c.
#define m3_rd_assp_code | ( | sc, | |
index | |||
) | m3_rd_assp(sc, MEMTYPE_INTERNAL_CODE, index) |
Definition at line 278 of file maestro3.c.
#define m3_rd_assp_data | ( | sc, | |
index | |||
) | m3_rd_assp(sc, MEMTYPE_INTERNAL_DATA, index) |
Definition at line 282 of file maestro3.c.
#define M3_UNLOCK | ( | _sc | ) | snd_mtxunlock((_sc)->sc_lock) |
Definition at line 165 of file maestro3.c.
Definition at line 275 of file maestro3.c.
Definition at line 276 of file maestro3.c.
Definition at line 277 of file maestro3.c.
#define m3_wr_assp_code | ( | sc, | |
index, | |||
data | |||
) | m3_wr_assp(sc, MEMTYPE_INTERNAL_CODE, index, data) |
Definition at line 280 of file maestro3.c.
#define m3_wr_assp_data | ( | sc, | |
index, | |||
data | |||
) | m3_wr_assp(sc, MEMTYPE_INTERNAL_DATA, index, data) |
Definition at line 284 of file maestro3.c.
anonymous enum |
Enumerator | |
---|---|
CHANGE | |
CALL | |
INTR | |
BORING | |
NONE |
Definition at line 76 of file maestro3.c.
anonymous enum |
Enumerator | |
---|---|
ESS_ALLEGRO_1 | |
ESS_MAESTRO3 |
Definition at line 83 of file maestro3.c.
AC97_DECLARE | ( | m3_codec | ) |
CHANNEL_DECLARE | ( | m3_pch | ) |
CHANNEL_DECLARE | ( | m3_rch | ) |
DRIVER_MODULE | ( | snd_maestro3 | , |
pci | , | ||
m3_driver | , | ||
pcm_devclass | , | ||
0 | , | ||
0 | |||
) |
|
static |
Definition at line 1704 of file maestro3.c.
References data, ESS_ALLEGRO_1, ESS_MAESTRO3, GPIO_DATA, GPIO_DIRECTION, GPIO_MASK, GPO_PRIMARY_AC97, GPO_SECONDARY_AC97, M3_LOCK_ASSERT, m3_rd_2, m3_wr_2, and sc_info::which.
Referenced by m3_init(), and m3_pci_resume().
|
static |
Definition at line 1624 of file maestro3.c.
References data, DSP_PORT_CONTROL_REG_B, M3_LOCK_ASSERT, m3_rd_1, m3_wr_1, and REGB_ENABLE_RESET.
Referenced by m3_init(), m3_pci_resume(), and m3_pci_suspend().
|
static |
Definition at line 621 of file maestro3.c.
References sc_chinfo::active, sc_info::pch, sc_info::pch_cnt, sc_info::rch, and sc_info::rch_cnt.
Referenced by m3_pchan_trigger_locked(), and m3_rchan_trigger_locked().
|
static |
Definition at line 1735 of file maestro3.c.
References COMMAND_ADDR_OUT, data, sc_info::delay1, sc_info::delay2, sc_info::dev, dir, GPIO_DATA, GPIO_DIRECTION, GPIO_MASK, GPO_PRIMARY_AC97, IO_SRAM_ENABLE, M3_LOCK_ASSERT, m3_rd_2, m3_rdcd(), m3_wr_2, retry, RING_BUS_CTRL_A, RING_BUS_CTRL_B, SDO_IN_DEST_CTRL, SDO_OUT_DEST_CTRL, SECOND_CODEC_ID_MASK, SERIAL_AC_LINK_ENABLE, and STATUS_ADDR_IN.
Referenced by m3_init(), and m3_pci_resume().
|
static |
Definition at line 1640 of file maestro3.c.
References ASSP_0_WS_ENABLE, ASSP_CLK_49MHZ_SELECT, ASSP_CONTROL_A, ASSP_CONTROL_B, CLK_DIV_BY_49, CLK_MULT_MODE_SELECT, CLK_MULT_MODE_SELECT_2, data, sc_info::dev, DSP_CLK_36MHZ_SELECT, ESS_ALLEGRO_1, ESS_MAESTRO3, HV_BUTTON_FROM_GD, HV_CTRL_ENABLE, IN_CLK_12MHZ_SELECT, INT_CLK_SRC_NOT_PCI, M3_LOCK, M3_LOCK_ASSERT, m3_rd_1, M3_UNLOCK, m3_wr_1, PCI_ALLEGRO_CONFIG, PCI_USER_CONFIG, PM_CTRL_ENABLE, REDUCED_DEBOUNCE, RESET_ASSP, RUN_ASSP, USE_PCI_TIMING, and sc_info::which.
Referenced by m3_init(), and m3_pci_resume().
|
static |
Definition at line 1694 of file maestro3.c.
References ASSP_CONTROL_C, ASSP_HOST_INT_ENABLE, ASSP_INT_ENABLE, data, HOST_INT_CTRL, HV_INT_ENABLE, m3_rd_1, m3_wr_1, and m3_wr_2.
Referenced by m3_pci_attach(), and m3_pci_resume().
|
static |
Definition at line 1214 of file maestro3.c.
References CHANGE, data, sc_info::dev, DISABLE_LEGACY, DSP_PORT_CONTROL_REG_B, gaw_kernel_vect_code, gaw_minisrc_code_0400, KDATA_BASE_ADDR, KDATA_BASE_ADDR2, KDATA_CURRENT_DMA, KDATA_DAC_LEFT_VOLUME, KDATA_DAC_RIGHT_VOLUME, KDATA_DMA_XFER0, KDATA_MIXER_TASK_NUMBER, KDATA_TASK0, m3_amp_enable(), m3_assp_halt(), m3_codec_reset(), m3_config(), M3_DEBUG, M3_DEFAULT_VOL, M3_LOCK_ASSERT, m3_wr_1, m3_wr_assp_code, m3_wr_assp_data, MINISRC_COEF_LOC, minisrc_lpf, NUM_UNITS_KERNEL_DATA, PCI_LEGACY_AUDIO_CTRL, REGB_ENABLE_RESET, REV_B_CODE_MEMORY_BEGIN, REV_B_DATA_MEMORY_UNIT_LENGTH, and size.
Referenced by m3_pci_attach().
|
static |
Definition at line 322 of file maestro3.c.
References CALL, CODEC_COMMAND, data, devinfo, M3_DEBUG, and m3_rd_1.
|
static |
Definition at line 1105 of file maestro3.c.
References sc_pchinfo::active, sc_rchinfo::active, ASSP_CONTROL_B, ASSP_HOST_INT_STATUS, ASSP_INT_PENDING, sc_pchinfo::buffer, sc_rchinfo::buffer, sc_pchinfo::bufsize, sc_rchinfo::bufsize, sc_pchinfo::channel, sc_rchinfo::channel, chn_intr(), sc_info::dev, DSP2HOST_REQ_TIMER, HOST_INT_STATUS, HV_INT_PENDING, HW_VOL_COUNTER_MASTER, INTR, M3_DEBUG, M3_LOCK, m3_pchan_getptr_internal(), m3_rchan_getptr_internal(), m3_rd_1, M3_UNLOCK, m3_wr_1, mixer_hwvol_mute(), mixer_hwvol_step(), sc_info::pch, sc_info::pch_cnt, sc_pchinfo::prevptr, sc_rchinfo::prevptr, sc_pchinfo::ptr, sc_rchinfo::ptr, sc_info::rch, sc_info::rch_cnt, sndbuf_getblksz(), status, and STOP_ASSP_CLOCK.
Referenced by m3_pci_attach().
|
static |
Definition at line 518 of file maestro3.c.
References sc_info::ch, CHANGE, KDATA_DMA_XFER0, KDATA_INSTANCE0_MINISRC, KDATA_MIXER_XFER0, M3_DEBUG, M3_LOCK, M3_UNLOCK, m3_wr_assp_data, sc_chinfo::parent, sc_info::pch_cnt, and sc_info::rch_cnt.
|
static |
Definition at line 740 of file maestro3.c.
References CALL, sc_pchinfo::dac_idx, M3_DEBUG, and m3_playcaps.
|
static |
Definition at line 726 of file maestro3.c.
References sc_info::ch, M3_LOCK, M3_UNLOCK, and sc_chinfo::parent.
|
static |
Definition at line 709 of file maestro3.c.
References sc_chinfo::buffer, CALL, CDATA_HOST_SRC_CURRENTH, CDATA_HOST_SRC_CURRENTL, sc_info::ch, M3_DEBUG, m3_rd_assp_data, sc_chinfo::parent, and sndbuf_getbufaddr().
Referenced by m3_intr().
|
static |
Definition at line 376 of file maestro3.c.
References addr, b, sc_pchinfo::buffer, sc_pchinfo::bufsize, sc_info::bufsz, c, CDATA_DMA_CONTROL, CDATA_HOST_SRC_ADDRH, CDATA_HOST_SRC_ADDRL, CDATA_HOST_SRC_CURRENTH, CDATA_HOST_SRC_CURRENTL, CDATA_HOST_SRC_END_PLUS_1H, CDATA_HOST_SRC_END_PLUS_1L, CDATA_IN_BUF_BEGIN, CDATA_IN_BUF_END_PLUS_1, CDATA_IN_BUF_HEAD, CDATA_IN_BUF_TAIL, CDATA_LEFT_VOLUME, CDATA_OUT_BUF_BEGIN, CDATA_OUT_BUF_END_PLUS_1, CDATA_OUT_BUF_HEAD, CDATA_OUT_BUF_TAIL, CDATA_RIGHT_VOLUME, CHANGE, sc_pchinfo::channel, sc_pchinfo::dac_data, sc_pchinfo::dac_idx, sc_info::dev, devinfo, dir, DMAC_BLOCKF_SELECTOR, DMAC_PAGE3_SELECTOR, DMACONTROL_AUTOREPEAT, DP_SHIFT_COUNT, DSP_DEFAULT_SPEED, sc_pchinfo::fmt, HI, KDATA_DMA_XFER0, KDATA_INSTANCE0_MINISRC, KDATA_MIXER_XFER0, LO, M3_DEBUG, M3_DEFAULT_VOL, M3_LOCK, m3_pchan_trigger_locked(), M3_UNLOCK, m3_wr_assp_data, MINISRC_BIQUAD_STAGE, MINISRC_COEF_LOC, MINISRC_IN_BUFFER_SIZE, MINISRC_OUT_BUFFER_SIZE, MINISRC_TMP_BUFFER_SIZE, sc_pchinfo::parent, sc_info::parent_dmat, sc_info::pch, sc_info::pch_cnt, PCMDIR_PLAY, PCMTRIG_START, PCMTRIG_STOP, sc_info::rch_cnt, SND_FORMAT, sndbuf_alloc(), sndbuf_getbufaddr(), sndbuf_getsize(), sc_pchinfo::spd, SRC3_DIRECTION_OFFSET, and val.
|
static |
Definition at line 593 of file maestro3.c.
References blocksize, sc_pchinfo::buffer, CHANGE, sc_pchinfo::dac_idx, M3_DEBUG, and sndbuf_getblksz().
|
static |
Definition at line 542 of file maestro3.c.
References AFMT_CHANNEL, sc_info::ch, CHANGE, data, sc_chinfo::fmt, format, M3_DEBUG, M3_LOCK, M3_UNLOCK, m3_wr_assp_data, sc_chinfo::parent, SRC3_MODE_OFFSET, and SRC3_WORD_LENGTH_OFFSET.
|
static |
Definition at line 570 of file maestro3.c.
References CDATA_FREQUENCY, sc_info::ch, CHANGE, M3_DEBUG, M3_LOCK, M3_UNLOCK, m3_wr_assp_data, sc_chinfo::parent, sc_chinfo::spd, and speed.
|
static |
Definition at line 604 of file maestro3.c.
References sc_info::ch, go, M3_LOCK, m3_pchan_trigger_locked(), M3_UNLOCK, sc_chinfo::parent, and PCMTRIG_COMMON.
|
static |
Definition at line 637 of file maestro3.c.
References sc_chinfo::active, CALL, CDATA_INSTANCE_READY, sc_info::ch, CHANGE, CLKRUN_GEN_ENABLE, data, go, HOST_INT_CTRL, KDATA_MIXER_TASK_NUMBER, KDATA_TIMER_COUNT_CURRENT, KDATA_TIMER_COUNT_RELOAD, m3_chan_active(), M3_DEBUG, M3_LOCK_ASSERT, m3_rd_2, m3_wr_2, m3_wr_assp_data, sc_chinfo::parent, sc_info::pch_active_cnt, PCMTRIG_ABORT, PCMTRIG_EMLDMARD, PCMTRIG_EMLDMAWR, PCMTRIG_START, and PCMTRIG_STOP.
Referenced by m3_pchan_init(), m3_pchan_trigger(), m3_pci_resume(), and m3_pci_suspend().
|
static |
Definition at line 1317 of file maestro3.c.
References AC97_CREATE, ac97_destroy(), ac97_getmixerclass(), sc_info::bufsz, CALL, m3_card_type::delay1, sc_info::delay1, m3_card_type::delay2, sc_info::delay2, sc_info::dev, dev, free, sc_info::ih, sc_info::irq, sc_info::irqid, len, M3_BUFSIZE_DEFAULT, M3_BUFSIZE_MAX, M3_BUFSIZE_MIN, m3_card_types, M3_DEBUG, m3_enable_ints(), m3_init(), m3_intr(), M3_LOCK, M3_MAXADDR, M3_PCHANS, m3_power(), M3_RCHANS, M3_UNLOCK, mixer_hwvol_init(), mixer_init(), sc_info::parent_dmat, m3_card_type::pci_id, PCIR_BAR, pcm_addchan(), pcm_getbuffersize(), PCM_KLDSTRING, pcm_register(), pcm_setstatus(), PCMDIR_PLAY, PCMDIR_REC, sc_info::reg, sc_info::regid, sc_info::regtype, REV_B_CODE_MEMORY_LENGTH, REV_B_DATA_MEMORY_LENGTH, sc_info::savemem, sc_info::sc_lock, sc_info::sh, snd_mtxcreate(), snd_mtxfree(), snd_setup_intr(), SND_STATUSLEN, sc_info::st, status, sc_info::type, m3_card_type::which, and sc_info::which.
|
static |
Definition at line 1480 of file maestro3.c.
References CALL, dev, free, sc_info::ih, sc_info::irq, sc_info::irqid, M3_DEBUG, M3_LOCK, m3_power(), m3_uninit(), M3_UNLOCK, sc_info::parent_dmat, pcm_getdevinfo(), pcm_unregister(), r, sc_info::reg, sc_info::regid, sc_info::regtype, sc_info::savemem, sc_info::sc_lock, and snd_mtxfree().
|
static |
Definition at line 1301 of file maestro3.c.
References CALL, dev, m3_card_types, M3_DEBUG, m3_card_type::name, and m3_card_type::pci_id.
|
static |
Definition at line 1550 of file maestro3.c.
References sc_chinfo::active, CHANGE, dev, DSP_PORT_CONTROL_REG_B, index, KDATA_DMA_ACTIVE, m3_amp_enable(), m3_assp_halt(), m3_codec_reset(), m3_config(), M3_DEBUG, m3_enable_ints(), M3_LOCK, m3_pchan_trigger_locked(), m3_power(), m3_rchan_trigger_locked(), M3_UNLOCK, m3_wr_1, m3_wr_assp_code, m3_wr_assp_data, mixer_reinit(), sc_info::pch, sc_info::pch_cnt, pcm_getdevinfo(), PCMTRIG_START, sc_info::rch, sc_info::rch_cnt, REGB_ENABLE_RESET, REV_B_CODE_MEMORY_BEGIN, REV_B_CODE_MEMORY_END, REV_B_DATA_MEMORY_BEGIN, REV_B_DATA_MEMORY_END, and sc_info::savemem.
|
static |
Definition at line 1610 of file maestro3.c.
References CALL, dev, M3_DEBUG, M3_LOCK, m3_power(), M3_UNLOCK, and pcm_getdevinfo().
|
static |
Definition at line 1508 of file maestro3.c.
References sc_chinfo::active, ASSP_CONTROL_C, CHANGE, dev, HOST_INT_CTRL, index, m3_assp_halt(), M3_DEBUG, M3_LOCK, m3_pchan_trigger_locked(), m3_power(), m3_rchan_trigger_locked(), m3_rd_assp_code, m3_rd_assp_data, M3_UNLOCK, m3_wr_1, m3_wr_2, sc_info::pch, sc_info::pch_cnt, pcm_getdevinfo(), PCMTRIG_STOP, sc_info::rch, sc_info::rch_cnt, REV_B_CODE_MEMORY_BEGIN, REV_B_CODE_MEMORY_END, REV_B_DATA_MEMORY_BEGIN, REV_B_DATA_MEMORY_END, and sc_info::savemem.
|
static |
Definition at line 1198 of file maestro3.c.
References CHANGE, data, sc_info::dev, M3_DEBUG, M3_LOCK_ASSERT, and state.
Referenced by m3_pci_attach(), m3_pci_detach(), m3_pci_resume(), m3_pci_shutdown(), and m3_pci_suspend().
|
static |
Definition at line 892 of file maestro3.c.
References sc_info::ch, CHANGE, KDATA_ADC1_XFER0, KDATA_DMA_XFER0, KDATA_INSTANCE0_MINISRC, M3_DEBUG, M3_LOCK, M3_UNLOCK, m3_wr_assp_data, sc_chinfo::parent, sc_info::pch_cnt, and sc_info::rch_cnt.
|
static |
Definition at line 1092 of file maestro3.c.
References sc_rchinfo::adc_idx, CALL, M3_DEBUG, and m3_reccaps.
|
static |
Definition at line 1078 of file maestro3.c.
References sc_info::ch, M3_LOCK, M3_UNLOCK, and sc_chinfo::parent.
|
static |
Definition at line 1061 of file maestro3.c.
References sc_chinfo::buffer, CALL, CDATA_HOST_SRC_CURRENTH, CDATA_HOST_SRC_CURRENTL, sc_info::ch, M3_DEBUG, m3_rd_assp_data, sc_chinfo::parent, and sndbuf_getbufaddr().
Referenced by m3_intr().
|
static |
Definition at line 753 of file maestro3.c.
References sc_rchinfo::adc_data, sc_rchinfo::adc_idx, addr, b, sc_rchinfo::buffer, sc_rchinfo::bufsize, sc_info::bufsz, c, CDATA_DMA_CONTROL, CDATA_HOST_SRC_ADDRH, CDATA_HOST_SRC_ADDRL, CDATA_HOST_SRC_CURRENTH, CDATA_HOST_SRC_CURRENTL, CDATA_HOST_SRC_END_PLUS_1H, CDATA_HOST_SRC_END_PLUS_1L, CDATA_IN_BUF_BEGIN, CDATA_IN_BUF_END_PLUS_1, CDATA_IN_BUF_HEAD, CDATA_IN_BUF_TAIL, CDATA_LEFT_VOLUME, CDATA_OUT_BUF_BEGIN, CDATA_OUT_BUF_END_PLUS_1, CDATA_OUT_BUF_HEAD, CDATA_OUT_BUF_TAIL, CDATA_RIGHT_VOLUME, CHANGE, sc_rchinfo::channel, sc_info::dev, devinfo, dir, DMAC_BLOCKF_SELECTOR, DMAC_PAGE3_SELECTOR, DMACONTROL_AUTOREPEAT, DMACONTROL_DIRECTION, DP_SHIFT_COUNT, DSP_DEFAULT_SPEED, sc_rchinfo::fmt, HI, KDATA_ADC1_XFER0, KDATA_DMA_XFER0, KDATA_INSTANCE0_MINISRC, LO, M3_DEBUG, M3_DEFAULT_VOL, M3_LOCK, m3_rchan_trigger_locked(), M3_UNLOCK, m3_wr_assp_data, MINISRC_IN_BUFFER_SIZE, MINISRC_OUT_BUFFER_SIZE, MINISRC_TMP_BUFFER_SIZE, sc_rchinfo::parent, sc_info::parent_dmat, sc_info::pch_cnt, PCMDIR_REC, PCMTRIG_START, PCMTRIG_STOP, sc_info::rch, sc_info::rch_cnt, SND_FORMAT, sndbuf_alloc(), sndbuf_getbufaddr(), sndbuf_getsize(), sc_rchinfo::spd, SRC3_DIRECTION_OFFSET, and val.
|
static |
Definition at line 966 of file maestro3.c.
References sc_rchinfo::adc_idx, blocksize, sc_rchinfo::buffer, CHANGE, M3_DEBUG, and sndbuf_getblksz().
|
static |
Definition at line 916 of file maestro3.c.
References AFMT_CHANNEL, sc_info::ch, CHANGE, data, sc_chinfo::fmt, format, M3_DEBUG, M3_LOCK, M3_UNLOCK, m3_wr_assp_data, sc_chinfo::parent, SRC3_MODE_OFFSET, and SRC3_WORD_LENGTH_OFFSET.
|
static |
Definition at line 943 of file maestro3.c.
References CDATA_FREQUENCY, sc_info::ch, CHANGE, M3_DEBUG, M3_LOCK, M3_UNLOCK, m3_wr_assp_data, sc_chinfo::parent, sc_chinfo::spd, and speed.
|
static |
Definition at line 977 of file maestro3.c.
References sc_info::ch, go, M3_LOCK, m3_rchan_trigger_locked(), M3_UNLOCK, sc_chinfo::parent, and PCMTRIG_COMMON.
|
static |
Definition at line 994 of file maestro3.c.
References sc_chinfo::active, CALL, CDATA_INSTANCE_READY, sc_info::ch, CHANGE, CLKRUN_GEN_ENABLE, data, go, HOST_INT_CTRL, KDATA_ADC1_REQUEST, KDATA_TIMER_COUNT_CURRENT, KDATA_TIMER_COUNT_RELOAD, m3_chan_active(), M3_DEBUG, M3_LOCK_ASSERT, m3_rd_2, m3_wr_2, m3_wr_assp_data, sc_chinfo::parent, PCMTRIG_ABORT, PCMTRIG_EMLDMARD, PCMTRIG_EMLDMAWR, PCMTRIG_START, and PCMTRIG_STOP.
Referenced by m3_pci_resume(), m3_pci_suspend(), m3_rchan_init(), and m3_rchan_trigger().
|
static |
Definition at line 288 of file maestro3.c.
References DSP_PORT_MEMORY_DATA, DSP_PORT_MEMORY_INDEX, DSP_PORT_MEMORY_TYPE, index, m3_rd_2, m3_wr_2, and MEMTYPE_MASK.
|
static |
Definition at line 336 of file maestro3.c.
References CODEC_COMMAND, CODEC_DATA, data, sc_info::dev, devinfo, m3_rd_2, m3_wait(), m3_wr_1, and regno.
Referenced by m3_codec_reset().
|
static |
Definition at line 1291 of file maestro3.c.
References CHANGE, and M3_DEBUG.
Referenced by m3_pci_detach().
|
static |
Definition at line 305 of file maestro3.c.
References CODEC_STATUS, and m3_rd_1.
Referenced by m3_rdcd(), and m3_wrcd().
|
static |
Definition at line 296 of file maestro3.c.
References data, DSP_PORT_MEMORY_DATA, DSP_PORT_MEMORY_INDEX, DSP_PORT_MEMORY_TYPE, index, m3_wr_2, and MEMTYPE_MASK.
|
static |
Definition at line 356 of file maestro3.c.
References CODEC_COMMAND, CODEC_DATA, data, sc_info::dev, devinfo, m3_wait(), m3_wr_1, m3_wr_2, and regno.
MODULE_DEPEND | ( | snd_maestro3 | , |
sound | , | ||
SOUND_MINVER | , | ||
SOUND_PREFVER | , | ||
SOUND_MAXVER | |||
) |
MODULE_VERSION | ( | snd_maestro3 | , |
1 | |||
) |
SND_DECLARE_FILE | ( | "$FreeBSD$" | ) |
|
static |
Referenced by m3_pci_attach(), and m3_pci_probe().
|
static |
Definition at line 214 of file maestro3.c.
|
static |
Definition at line 1791 of file maestro3.c.
|
static |
Definition at line 1781 of file maestro3.c.
|
static |
Definition at line 234 of file maestro3.c.
|
static |
Definition at line 232 of file maestro3.c.
Referenced by m3_pchan_getcaps().
|
static |
Definition at line 225 of file maestro3.c.
|
static |
Definition at line 256 of file maestro3.c.
|
static |
Definition at line 254 of file maestro3.c.
Referenced by m3_rchan_getcaps().
|
static |
Definition at line 247 of file maestro3.c.