FreeBSD kernel sound device code
maestro3.c File Reference
Include dependency graph for maestro3.c:

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_capsm3_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_capsm3_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
 

Macro Definition Documentation

◆ HI

#define HI (   x)    (((x) & 0xffff0000) >> 16)

Definition at line 373 of file maestro3.c.

◆ LO

#define LO (   x)    (((x) & 0x0000ffff) )

Definition at line 372 of file maestro3.c.

◆ M3_BUFSIZE_DEFAULT

#define M3_BUFSIZE_DEFAULT   4096

Definition at line 99 of file maestro3.c.

◆ M3_BUFSIZE_MAX

#define M3_BUFSIZE_MAX   65536

Definition at line 98 of file maestro3.c.

◆ M3_BUFSIZE_MIN

#define M3_BUFSIZE_MIN   4096

Definition at line 97 of file maestro3.c.

◆ M3_DEBUG

#define M3_DEBUG (   level,
  _msg 
)    {if ((level) <= M3_DEBUG_LEVEL) {printf _msg;}}

Definition at line 80 of file maestro3.c.

◆ M3_DEBUG_LEVEL

#define M3_DEBUG_LEVEL   NONE

Definition at line 78 of file maestro3.c.

◆ M3_DEFAULT_VOL

#define M3_DEFAULT_VOL   0x6800

Definition at line 103 of file maestro3.c.

◆ M3_LOCK

#define M3_LOCK (   _sc)    snd_mtxlock((_sc)->sc_lock)

Definition at line 164 of file maestro3.c.

◆ M3_LOCK_ASSERT

#define M3_LOCK_ASSERT (   _sc)    snd_mtxassert((_sc)->sc_lock)

Definition at line 166 of file maestro3.c.

◆ M3_MAXADDR

#define M3_MAXADDR   ((1 << 27) - 1)

Definition at line 102 of file maestro3.c.

◆ M3_MODEL

#define M3_MODEL   1

Definition at line 67 of file maestro3.c.

◆ M3_PCHANS

#define M3_PCHANS   4 /* create /dev/dsp0.[0-N] to use more than one */

Definition at line 100 of file maestro3.c.

◆ M3_RCHANS

#define M3_RCHANS   1

Definition at line 101 of file maestro3.c.

◆ m3_rd_1

#define m3_rd_1 (   sc,
  regno 
)    bus_space_read_1(sc->st, sc->sh, regno)

Definition at line 272 of file maestro3.c.

◆ m3_rd_2

#define m3_rd_2 (   sc,
  regno 
)    bus_space_read_2(sc->st, sc->sh, regno)

Definition at line 273 of file maestro3.c.

◆ m3_rd_4

#define m3_rd_4 (   sc,
  regno 
)    bus_space_read_4(sc->st, sc->sh, regno)

Definition at line 274 of file maestro3.c.

◆ m3_rd_assp_code

#define m3_rd_assp_code (   sc,
  index 
)     m3_rd_assp(sc, MEMTYPE_INTERNAL_CODE, index)

Definition at line 278 of file maestro3.c.

◆ m3_rd_assp_data

#define m3_rd_assp_data (   sc,
  index 
)     m3_rd_assp(sc, MEMTYPE_INTERNAL_DATA, index)

Definition at line 282 of file maestro3.c.

◆ M3_UNLOCK

#define M3_UNLOCK (   _sc)    snd_mtxunlock((_sc)->sc_lock)

Definition at line 165 of file maestro3.c.

◆ m3_wr_1

#define m3_wr_1 (   sc,
  regno,
  data 
)    bus_space_write_1(sc->st, sc->sh, regno, data)

Definition at line 275 of file maestro3.c.

◆ m3_wr_2

#define m3_wr_2 (   sc,
  regno,
  data 
)    bus_space_write_2(sc->st, sc->sh, regno, data)

Definition at line 276 of file maestro3.c.

◆ m3_wr_4

#define m3_wr_4 (   sc,
  regno,
  data 
)    bus_space_write_4(sc->st, sc->sh, regno, data)

Definition at line 277 of file maestro3.c.

◆ m3_wr_assp_code

#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.

◆ m3_wr_assp_data

#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.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CHANGE 
CALL 
INTR 
BORING 
NONE 

Definition at line 76 of file maestro3.c.

◆ anonymous enum

anonymous enum
Enumerator
ESS_ALLEGRO_1 
ESS_MAESTRO3 

Definition at line 83 of file maestro3.c.

Function Documentation

◆ AC97_DECLARE()

AC97_DECLARE ( m3_codec  )

◆ CHANNEL_DECLARE() [1/2]

CHANNEL_DECLARE ( m3_pch  )

◆ CHANNEL_DECLARE() [2/2]

CHANNEL_DECLARE ( m3_rch  )

◆ DRIVER_MODULE()

DRIVER_MODULE ( snd_maestro3  ,
pci  ,
m3_driver  ,
pcm_devclass  ,
,
 
)

◆ m3_amp_enable()

static void m3_amp_enable ( struct sc_info sc)
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().

Here is the caller graph for this function:

◆ m3_assp_halt()

static u_int8_t m3_assp_halt ( struct sc_info sc)
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().

Here is the caller graph for this function:

◆ m3_chan_active()

static int m3_chan_active ( struct sc_info sc)
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().

Here is the caller graph for this function:

◆ m3_codec_reset()

static void m3_codec_reset ( struct sc_info sc)
static

◆ m3_config()

◆ m3_enable_ints()

static void m3_enable_ints ( struct sc_info sc)
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().

Here is the caller graph for this function:

◆ m3_init()

◆ m3_initcd()

static u_int32_t m3_initcd ( kobj_t  kobj,
void *  devinfo 
)
static

Definition at line 322 of file maestro3.c.

References CALL, CODEC_COMMAND, data, devinfo, M3_DEBUG, and m3_rd_1.

◆ m3_intr()

◆ m3_pchan_free()

static int m3_pchan_free ( kobj_t  kobj,
void *  chdata 
)
static

◆ m3_pchan_getcaps()

static struct pcmchan_caps * m3_pchan_getcaps ( kobj_t  kobj,
void *  chdata 
)
static

Definition at line 740 of file maestro3.c.

References CALL, sc_pchinfo::dac_idx, M3_DEBUG, and m3_playcaps.

◆ m3_pchan_getptr()

static u_int32_t m3_pchan_getptr ( kobj_t  kobj,
void *  chdata 
)
static

Definition at line 726 of file maestro3.c.

References sc_info::ch, M3_LOCK, M3_UNLOCK, and sc_chinfo::parent.

◆ m3_pchan_getptr_internal()

static u_int32_t m3_pchan_getptr_internal ( struct sc_pchinfo ch)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m3_pchan_init()

◆ m3_pchan_setblocksize()

static u_int32_t m3_pchan_setblocksize ( kobj_t  kobj,
void *  chdata,
u_int32_t  blocksize 
)
static

Definition at line 593 of file maestro3.c.

References blocksize, sc_pchinfo::buffer, CHANGE, sc_pchinfo::dac_idx, M3_DEBUG, and sndbuf_getblksz().

Here is the call graph for this function:

◆ m3_pchan_setformat()

static int m3_pchan_setformat ( kobj_t  kobj,
void *  chdata,
u_int32_t  format 
)
static

◆ m3_pchan_setspeed()

static u_int32_t m3_pchan_setspeed ( kobj_t  kobj,
void *  chdata,
u_int32_t  speed 
)
static

◆ m3_pchan_trigger()

static int m3_pchan_trigger ( kobj_t  kobj,
void *  chdata,
int  go 
)
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.

Here is the call graph for this function:

◆ m3_pchan_trigger_locked()

static int m3_pchan_trigger_locked ( kobj_t  kobj,
void *  chdata,
int  go 
)
static

◆ m3_pci_attach()

◆ m3_pci_detach()

static int m3_pci_detach ( device_t  dev)
static

◆ m3_pci_probe()

static int m3_pci_probe ( device_t  dev)
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.

◆ m3_pci_resume()

◆ m3_pci_shutdown()

static int m3_pci_shutdown ( device_t  dev)
static

Definition at line 1610 of file maestro3.c.

References CALL, dev, M3_DEBUG, M3_LOCK, m3_power(), M3_UNLOCK, and pcm_getdevinfo().

Here is the call graph for this function:

◆ m3_pci_suspend()

◆ m3_power()

static int m3_power ( struct sc_info sc,
int  state 
)
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().

Here is the caller graph for this function:

◆ m3_rchan_free()

static int m3_rchan_free ( kobj_t  kobj,
void *  chdata 
)
static

◆ m3_rchan_getcaps()

static struct pcmchan_caps * m3_rchan_getcaps ( kobj_t  kobj,
void *  chdata 
)
static

Definition at line 1092 of file maestro3.c.

References sc_rchinfo::adc_idx, CALL, M3_DEBUG, and m3_reccaps.

◆ m3_rchan_getptr()

static u_int32_t m3_rchan_getptr ( kobj_t  kobj,
void *  chdata 
)
static

Definition at line 1078 of file maestro3.c.

References sc_info::ch, M3_LOCK, M3_UNLOCK, and sc_chinfo::parent.

◆ m3_rchan_getptr_internal()

static u_int32_t m3_rchan_getptr_internal ( struct sc_rchinfo ch)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m3_rchan_init()

◆ m3_rchan_setblocksize()

static u_int32_t m3_rchan_setblocksize ( kobj_t  kobj,
void *  chdata,
u_int32_t  blocksize 
)
static

Definition at line 966 of file maestro3.c.

References sc_rchinfo::adc_idx, blocksize, sc_rchinfo::buffer, CHANGE, M3_DEBUG, and sndbuf_getblksz().

Here is the call graph for this function:

◆ m3_rchan_setformat()

static int m3_rchan_setformat ( kobj_t  kobj,
void *  chdata,
u_int32_t  format 
)
static

◆ m3_rchan_setspeed()

static u_int32_t m3_rchan_setspeed ( kobj_t  kobj,
void *  chdata,
u_int32_t  speed 
)
static

◆ m3_rchan_trigger()

static int m3_rchan_trigger ( kobj_t  kobj,
void *  chdata,
int  go 
)
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.

Here is the call graph for this function:

◆ m3_rchan_trigger_locked()

static int m3_rchan_trigger_locked ( kobj_t  kobj,
void *  chdata,
int  go 
)
static

◆ m3_rd_assp()

static __inline u_int16_t m3_rd_assp ( struct sc_info sc,
u_int16_t  region,
u_int16_t  index 
)
static

◆ m3_rdcd()

static int m3_rdcd ( kobj_t  kobj,
void *  devinfo,
int  regno 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m3_uninit()

static int m3_uninit ( struct sc_info sc)
static

Definition at line 1291 of file maestro3.c.

References CHANGE, and M3_DEBUG.

Referenced by m3_pci_detach().

Here is the caller graph for this function:

◆ m3_wait()

static __inline int m3_wait ( struct sc_info sc)
static

Definition at line 305 of file maestro3.c.

References CODEC_STATUS, and m3_rd_1.

Referenced by m3_rdcd(), and m3_wrcd().

Here is the caller graph for this function:

◆ m3_wr_assp()

static __inline void m3_wr_assp ( struct sc_info sc,
u_int16_t  region,
u_int16_t  index,
u_int16_t  data 
)
static

◆ m3_wrcd()

static int m3_wrcd ( kobj_t  kobj,
void *  devinfo,
int  regno,
u_int32_t  data 
)
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.

Here is the call graph for this function:

◆ MODULE_DEPEND()

MODULE_DEPEND ( snd_maestro3  ,
sound  ,
SOUND_MINVER  ,
SOUND_PREFVER  ,
SOUND_MAXVER   
)

◆ MODULE_VERSION()

MODULE_VERSION ( snd_maestro3  ,
 
)

◆ SND_DECLARE_FILE()

SND_DECLARE_FILE ( "$FreeBSD$"  )

Variable Documentation

◆ m3_card_types

struct m3_card_type m3_card_types[]
static
Initial value:
= {
{ 0x1988125d, ESS_ALLEGRO_1, 50, 800, "ESS Technology Allegro-1" },
{ 0x1998125d, ESS_MAESTRO3, 20, 500, "ESS Technology Maestro3" },
{ 0x199a125d, ESS_MAESTRO3, 20, 500, "ESS Technology Maestro3" },
{ 0, 0, 0, 0, NULL }
}
@ ESS_ALLEGRO_1
Definition: maestro3.c:84
@ ESS_MAESTRO3
Definition: maestro3.c:85

Referenced by m3_pci_attach(), and m3_pci_probe().

◆ m3_codec_methods

kobj_method_t m3_codec_methods[]
static
Initial value:
= {
KOBJMETHOD(ac97_init, m3_initcd),
KOBJMETHOD(ac97_read, m3_rdcd),
KOBJMETHOD(ac97_write, m3_wrcd),
}
static int m3_wrcd(kobj_t, void *, int, u_int32_t)
Definition: maestro3.c:356
static int m3_rdcd(kobj_t, void *, int)
Definition: maestro3.c:336
static u_int32_t m3_initcd(kobj_t, void *)
Definition: maestro3.c:322
#define KOBJMETHOD_END
Definition: midi.c:76

Definition at line 214 of file maestro3.c.

◆ m3_driver

driver_t m3_driver
static
Initial value:
= {
"pcm",
}
static device_method_t m3_methods[]
Definition: maestro3.c:1781
#define PCM_SOFTC_SIZE
Definition: sound.h:96

Definition at line 1791 of file maestro3.c.

◆ m3_methods

device_method_t m3_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, m3_pci_probe),
DEVMETHOD(device_attach, m3_pci_attach),
DEVMETHOD(device_detach, m3_pci_detach),
DEVMETHOD(device_suspend, m3_pci_suspend),
DEVMETHOD(device_resume, m3_pci_resume),
DEVMETHOD(device_shutdown, m3_pci_shutdown),
{ 0, 0 }
}
static int m3_pci_resume(device_t dev)
Definition: maestro3.c:1550
static int m3_pci_suspend(device_t dev)
Definition: maestro3.c:1508
static int m3_pci_probe(device_t dev)
Definition: maestro3.c:1301
static int m3_pci_attach(device_t dev)
Definition: maestro3.c:1317
static int m3_pci_shutdown(device_t dev)
Definition: maestro3.c:1610
static int m3_pci_detach(device_t dev)
Definition: maestro3.c:1480

Definition at line 1781 of file maestro3.c.

◆ m3_pch_methods

kobj_method_t m3_pch_methods[]
static
Initial value:
= {
KOBJMETHOD(channel_init, m3_pchan_init),
KOBJMETHOD(channel_setformat, m3_pchan_setformat),
KOBJMETHOD(channel_setspeed, m3_pchan_setspeed),
KOBJMETHOD(channel_setblocksize, m3_pchan_setblocksize),
KOBJMETHOD(channel_trigger, m3_pchan_trigger),
KOBJMETHOD(channel_getptr, m3_pchan_getptr),
KOBJMETHOD(channel_getcaps, m3_pchan_getcaps),
KOBJMETHOD(channel_free, m3_pchan_free),
}
static int m3_pchan_setformat(kobj_t, void *, u_int32_t)
Definition: maestro3.c:542
static u_int32_t m3_pchan_setspeed(kobj_t, void *, u_int32_t)
Definition: maestro3.c:570
static int m3_pchan_free(kobj_t, void *)
Definition: maestro3.c:518
static void * m3_pchan_init(kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int)
Definition: maestro3.c:376
static u_int32_t m3_pchan_setblocksize(kobj_t, void *, u_int32_t)
Definition: maestro3.c:593
static u_int32_t m3_pchan_getptr(kobj_t, void *)
Definition: maestro3.c:726
static struct pcmchan_caps * m3_pchan_getcaps(kobj_t, void *)
Definition: maestro3.c:740
static int m3_pchan_trigger(kobj_t, void *, int)
Definition: maestro3.c:604

Definition at line 234 of file maestro3.c.

◆ m3_playcaps

struct pcmchan_caps m3_playcaps = {8000, 48000, m3_playfmt, 0}
static

Definition at line 232 of file maestro3.c.

Referenced by m3_pchan_getcaps().

◆ m3_playfmt

u_int32_t m3_playfmt[]
static
Initial value:
= {
SND_FORMAT(AFMT_U8, 1, 0),
SND_FORMAT(AFMT_U8, 2, 0),
SND_FORMAT(AFMT_S16_LE, 1, 0),
SND_FORMAT(AFMT_S16_LE, 2, 0),
0
}
#define SND_FORMAT(f, c, e)
Definition: sound.h:238

Definition at line 225 of file maestro3.c.

◆ m3_rch_methods

kobj_method_t m3_rch_methods[]
static
Initial value:
= {
KOBJMETHOD(channel_init, m3_rchan_init),
KOBJMETHOD(channel_setformat, m3_rchan_setformat),
KOBJMETHOD(channel_setspeed, m3_rchan_setspeed),
KOBJMETHOD(channel_setblocksize, m3_rchan_setblocksize),
KOBJMETHOD(channel_trigger, m3_rchan_trigger),
KOBJMETHOD(channel_getptr, m3_rchan_getptr),
KOBJMETHOD(channel_getcaps, m3_rchan_getcaps),
KOBJMETHOD(channel_free, m3_rchan_free),
}
static u_int32_t m3_rchan_setblocksize(kobj_t, void *, u_int32_t)
Definition: maestro3.c:966
static struct pcmchan_caps * m3_rchan_getcaps(kobj_t, void *)
Definition: maestro3.c:1092
static int m3_rchan_trigger(kobj_t, void *, int)
Definition: maestro3.c:977
static int m3_rchan_setformat(kobj_t, void *, u_int32_t)
Definition: maestro3.c:916
static void * m3_rchan_init(kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int)
Definition: maestro3.c:753
static u_int32_t m3_rchan_getptr(kobj_t, void *)
Definition: maestro3.c:1078
static u_int32_t m3_rchan_setspeed(kobj_t, void *, u_int32_t)
Definition: maestro3.c:943
static int m3_rchan_free(kobj_t, void *)
Definition: maestro3.c:892

Definition at line 256 of file maestro3.c.

◆ m3_reccaps

struct pcmchan_caps m3_reccaps = {8000, 48000, m3_recfmt, 0}
static

Definition at line 254 of file maestro3.c.

Referenced by m3_rchan_getcaps().

◆ m3_recfmt

u_int32_t m3_recfmt[]
static
Initial value:
= {
SND_FORMAT(AFMT_U8, 1, 0),
SND_FORMAT(AFMT_U8, 2, 0),
SND_FORMAT(AFMT_S16_LE, 1, 0),
SND_FORMAT(AFMT_S16_LE, 2, 0),
0
}

Definition at line 247 of file maestro3.c.