FreeBSD kernel sound device code
via8233.c File Reference
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <sys/sysctl.h>
#include <dev/sound/pci/via8233.h>
Include dependency graph for via8233.c:

Go to the source code of this file.

Data Structures

struct  via_dma_op
 
struct  via_chinfo
 
struct  via_info
 

Macros

#define VIA8233_PCI_ID   0x30591106
 
#define VIA8233_REV_ID_8233PRE   0x10
 
#define VIA8233_REV_ID_8233C   0x20
 
#define VIA8233_REV_ID_8233   0x30
 
#define VIA8233_REV_ID_8233A   0x40
 
#define VIA8233_REV_ID_8235   0x50
 
#define VIA8233_REV_ID_8237   0x60
 
#define VIA8233_REV_ID_8251   0x70
 
#define SEGS_PER_CHAN   2 /* Segments per channel */
 
#define NDXSCHANS   4 /* No of DXS channels */
 
#define NMSGDCHANS   1 /* No of multichannel SGD */
 
#define NWRCHANS   1 /* No of write channels */
 
#define NCHANS   (NWRCHANS + NDXSCHANS + NMSGDCHANS)
 
#define NSEGS   NCHANS * SEGS_PER_CHAN /* Segments in SGD table */
 
#define VIA_SEGS_MIN   2
 
#define VIA_SEGS_MAX   64
 
#define VIA_SEGS_DEFAULT   2
 
#define VIA_BLK_MIN   32
 
#define VIA_BLK_ALIGN   (~(VIA_BLK_MIN - 1))
 
#define VIA_DEFAULT_BUFSZ   0x1000
 
#define VIA_DMAOP_EOL   0x80000000
 
#define VIA_DMAOP_FLAG   0x40000000
 
#define VIA_DMAOP_STOP   0x20000000
 
#define VIA_DMAOP_COUNT(x)   ((x)&0x00FFFFFF)
 

Functions

 SND_DECLARE_FILE ("$FreeBSD$")
 
static __inline int via_chan_active (struct via_info *via)
 
static int sysctl_via8233_spdif_enable (SYSCTL_HANDLER_ARGS)
 
static int sysctl_via8233_dxs_src (SYSCTL_HANDLER_ARGS)
 
static int sysctl_via_polling (SYSCTL_HANDLER_ARGS)
 
static void via_init_sysctls (device_t dev)
 
static __inline uint32_t via_rd (struct via_info *via, int regno, int size)
 
static __inline void via_wr (struct via_info *via, int regno, uint32_t data, int size)
 
static int via_waitready_codec (struct via_info *via)
 
static int via_waitvalid_codec (struct via_info *via)
 
static int via_write_codec (kobj_t obj, void *addr, int reg, uint32_t val)
 
static int via_read_codec (kobj_t obj, void *addr, int reg)
 
 AC97_DECLARE (via_ac97)
 
static int via_buildsgdt (struct via_chinfo *ch)
 
static int via8233wr_setformat (kobj_t obj, void *data, uint32_t format)
 
static int via8233dxs_setformat (kobj_t obj, void *data, uint32_t format)
 
static int via8233msgd_setformat (kobj_t obj, void *data, uint32_t format)
 
static uint32_t via8233wr_setspeed (kobj_t obj, void *data, uint32_t speed)
 
static uint32_t via8233dxs_setspeed (kobj_t obj, void *data, uint32_t speed)
 
static uint32_t via8233msgd_setspeed (kobj_t obj, void *data, uint32_t speed)
 
static struct pcmchan_capsvia8233wr_getcaps (kobj_t obj, void *data)
 
static struct pcmchan_capsvia8233dxs_getcaps (kobj_t obj, void *data)
 
static struct pcmchan_capsvia8233msgd_getcaps (kobj_t obj, void *data)
 
static int via8233chan_setfragments (kobj_t obj, void *data, uint32_t blksz, uint32_t blkcnt)
 
static uint32_t via8233chan_setblocksize (kobj_t obj, void *data, uint32_t blksz)
 
static uint32_t via8233chan_getptr (kobj_t obj, void *data)
 
static void via8233chan_reset (struct via_info *via, struct via_chinfo *ch)
 
static void via8233chan_sgdinit (struct via_info *via, struct via_chinfo *ch, int chnum)
 
static void * via8233wr_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
 
static void * via8233dxs_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
 
static void * via8233msgd_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
 
static void via8233chan_mute (struct via_info *via, struct via_chinfo *ch, int muted)
 
static __inline int via_poll_channel (struct via_chinfo *ch)
 
static void via_poll_callback (void *arg)
 
static int via_poll_ticks (struct via_info *via)
 
static int via8233chan_trigger (kobj_t obj, void *data, int go)
 
 CHANNEL_DECLARE (via8233wr)
 
 CHANNEL_DECLARE (via8233dxs)
 
 CHANNEL_DECLARE (via8233msgd)
 
static void via_intr (void *p)
 
static int via_probe (device_t dev)
 
static void dma_cb (void *p, bus_dma_segment_t *bds, int a, int b)
 
static int via_chip_init (device_t dev)
 
static int via_attach (device_t dev)
 
static int via_detach (device_t dev)
 
 DRIVER_MODULE (snd_via8233, pci, via_driver, pcm_devclass, 0, 0)
 
 MODULE_DEPEND (snd_via8233, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER)
 
 MODULE_VERSION (snd_via8233, 1)
 

Variables

static uint32_t via_fmt []
 
static struct pcmchan_caps via_vracaps = { 4000, 48000, via_fmt, 0 }
 
static struct pcmchan_caps via_caps = { 48000, 48000, via_fmt, 0 }
 
static kobj_method_t via_ac97_methods []
 
static kobj_method_t via8233wr_methods []
 
static kobj_method_t via8233dxs_methods []
 
static kobj_method_t via8233msgd_methods []
 
static device_method_t via_methods []
 
static driver_t via_driver
 

Macro Definition Documentation

◆ NCHANS

#define NCHANS   (NWRCHANS + NDXSCHANS + NMSGDCHANS)

Definition at line 69 of file via8233.c.

◆ NDXSCHANS

#define NDXSCHANS   4 /* No of DXS channels */

Definition at line 66 of file via8233.c.

◆ NMSGDCHANS

#define NMSGDCHANS   1 /* No of multichannel SGD */

Definition at line 67 of file via8233.c.

◆ NSEGS

#define NSEGS   NCHANS * SEGS_PER_CHAN /* Segments in SGD table */

Definition at line 70 of file via8233.c.

◆ NWRCHANS

#define NWRCHANS   1 /* No of write channels */

Definition at line 68 of file via8233.c.

◆ SEGS_PER_CHAN

#define SEGS_PER_CHAN   2 /* Segments per channel */

Definition at line 65 of file via8233.c.

◆ VIA8233_PCI_ID

#define VIA8233_PCI_ID   0x30591106

Definition at line 55 of file via8233.c.

◆ VIA8233_REV_ID_8233

#define VIA8233_REV_ID_8233   0x30

Definition at line 59 of file via8233.c.

◆ VIA8233_REV_ID_8233A

#define VIA8233_REV_ID_8233A   0x40

Definition at line 60 of file via8233.c.

◆ VIA8233_REV_ID_8233C

#define VIA8233_REV_ID_8233C   0x20

Definition at line 58 of file via8233.c.

◆ VIA8233_REV_ID_8233PRE

#define VIA8233_REV_ID_8233PRE   0x10

Definition at line 57 of file via8233.c.

◆ VIA8233_REV_ID_8235

#define VIA8233_REV_ID_8235   0x50

Definition at line 61 of file via8233.c.

◆ VIA8233_REV_ID_8237

#define VIA8233_REV_ID_8237   0x60

Definition at line 62 of file via8233.c.

◆ VIA8233_REV_ID_8251

#define VIA8233_REV_ID_8251   0x70

Definition at line 63 of file via8233.c.

◆ VIA_BLK_ALIGN

#define VIA_BLK_ALIGN   (~(VIA_BLK_MIN - 1))

Definition at line 75 of file via8233.c.

◆ VIA_BLK_MIN

#define VIA_BLK_MIN   32

Definition at line 74 of file via8233.c.

◆ VIA_DEFAULT_BUFSZ

#define VIA_DEFAULT_BUFSZ   0x1000

Definition at line 77 of file via8233.c.

◆ VIA_DMAOP_COUNT

#define VIA_DMAOP_COUNT (   x)    ((x)&0x00FFFFFF)

Definition at line 86 of file via8233.c.

◆ VIA_DMAOP_EOL

#define VIA_DMAOP_EOL   0x80000000

Definition at line 83 of file via8233.c.

◆ VIA_DMAOP_FLAG

#define VIA_DMAOP_FLAG   0x40000000

Definition at line 84 of file via8233.c.

◆ VIA_DMAOP_STOP

#define VIA_DMAOP_STOP   0x20000000

Definition at line 85 of file via8233.c.

◆ VIA_SEGS_DEFAULT

#define VIA_SEGS_DEFAULT   2

Definition at line 73 of file via8233.c.

◆ VIA_SEGS_MAX

#define VIA_SEGS_MAX   64

Definition at line 72 of file via8233.c.

◆ VIA_SEGS_MIN

#define VIA_SEGS_MIN   2

Definition at line 71 of file via8233.c.

Function Documentation

◆ AC97_DECLARE()

AC97_DECLARE ( via_ac97  )

◆ CHANNEL_DECLARE() [1/3]

CHANNEL_DECLARE ( via8233dxs  )

◆ CHANNEL_DECLARE() [2/3]

CHANNEL_DECLARE ( via8233msgd  )

◆ CHANNEL_DECLARE() [3/3]

CHANNEL_DECLARE ( via8233wr  )

◆ dma_cb()

static void dma_cb ( void *  p,
bus_dma_segment_t *  bds,
int  a,
int  b 
)
static

Definition at line 1104 of file via8233.c.

References via_info::sgd_addr.

Referenced by via_attach().

Here is the caller graph for this function:

◆ DRIVER_MODULE()

DRIVER_MODULE ( snd_via8233  ,
pci  ,
via_driver  ,
pcm_devclass  ,
,
 
)

◆ MODULE_DEPEND()

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

◆ MODULE_VERSION()

MODULE_VERSION ( snd_via8233  ,
 
)

◆ SND_DECLARE_FILE()

SND_DECLARE_FILE ( "$FreeBSD$"  )

◆ sysctl_via8233_dxs_src()

static int sysctl_via8233_dxs_src ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 192 of file via8233.c.

References dev, via_info::dxs_src, via_info::lock, pcm_getdevinfo(), req, snd_mtxlock, snd_mtxunlock, and val.

Referenced by via_init_sysctls().

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

◆ sysctl_via8233_spdif_enable()

static int sysctl_via8233_spdif_enable ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 160 of file via8233.c.

References dev, via_info::lock, pcm_getdevinfo(), r, req, snd_mtxlock, snd_mtxunlock, VIA_PCI_SPDIF, and VIA_SPDIF_EN.

Referenced by via_init_sysctls().

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

◆ sysctl_via_polling()

static int sysctl_via_polling ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 218 of file via8233.c.

References dev, via_info::lock, pcm_getdevinfo(), via_info::polling, req, snd_mtxlock, snd_mtxunlock, val, and via_chan_active().

Referenced by via_init_sysctls().

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

◆ via8233chan_getptr()

static uint32_t via8233chan_getptr ( kobj_t  obj,
void *  data 
)
static

◆ via8233chan_mute()

static void via8233chan_mute ( struct via_info via,
struct via_chinfo ch,
int  muted 
)
static

Definition at line 756 of file via8233.c.

References BASE_IS_VIA_DXS_REG, via_info::dev, r, via_chinfo::rbase, VIA8233_DXS_MUTE, VIA8233_RP_DXS_LVOL, VIA8233_RP_DXS_RVOL, via_rd(), and via_wr().

Referenced by via8233chan_trigger().

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

◆ via8233chan_reset()

static void via8233chan_reset ( struct via_info via,
struct via_chinfo ch 
)
static

Definition at line 638 of file via8233.c.

References via_chinfo::rbase, SGD_CONTROL_STOP, SGD_STATUS_EOL, SGD_STATUS_FLAG, VIA_RP_CONTROL, VIA_RP_STATUS, and via_wr().

Referenced by via8233chan_trigger(), via8233dxs_init(), via8233msgd_init(), and via8233wr_init().

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

◆ via8233chan_setblocksize()

static uint32_t via8233chan_setblocksize ( kobj_t  obj,
void *  data,
uint32_t  blksz 
)
static

Definition at line 604 of file via8233.c.

References via_info::blkcnt, blksz, via_chinfo::blksz, data, via_chinfo::parent, and via8233chan_setfragments().

Here is the call graph for this function:

◆ via8233chan_setfragments()

static int via8233chan_setfragments ( kobj_t  obj,
void *  data,
uint32_t  blksz,
uint32_t  blkcnt 
)
static

Definition at line 565 of file via8233.c.

References blkcnt, via_chinfo::blkcnt, blksz, via_chinfo::blksz, via_chinfo::buffer, data, via_info::dev, via_chinfo::parent, sndbuf_getblkcnt(), sndbuf_getblksz(), sndbuf_getmaxsize(), sndbuf_resize(), VIA_BLK_ALIGN, VIA_BLK_MIN, VIA_SEGS_MAX, and VIA_SEGS_MIN.

Referenced by via8233chan_setblocksize().

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

◆ via8233chan_sgdinit()

static void via8233chan_sgdinit ( struct via_info via,
struct via_chinfo ch,
int  chnum 
)
static

Definition at line 650 of file via8233.c.

References via_chinfo::sgd_addr, via_info::sgd_addr, via_chinfo::sgd_table, via_info::sgd_table, and VIA_SEGS_MAX.

Referenced by via8233dxs_init(), via8233msgd_init(), and via8233wr_init().

Here is the caller graph for this function:

◆ via8233chan_trigger()

◆ via8233dxs_getcaps()

static struct pcmchan_caps * via8233dxs_getcaps ( kobj_t  obj,
void *  data 
)
static

Definition at line 533 of file via8233.c.

References data, via_info::dxs_src, via_chinfo::parent, via_caps, and via_vracaps.

◆ via8233dxs_init()

static void * via8233dxs_init ( kobj_t  obj,
void *  devinfo,
struct snd_dbuf b,
struct pcm_channel c,
int  dir 
)
static

◆ via8233dxs_setformat()

static int via8233dxs_setformat ( kobj_t  obj,
void *  data,
uint32_t  format 
)
static

◆ via8233dxs_setspeed()

static uint32_t via8233dxs_setspeed ( kobj_t  obj,
void *  data,
uint32_t  speed 
)
static

Definition at line 486 of file via8233.c.

References data, via_info::lock, via_chinfo::parent, r, via_chinfo::rbase, snd_mtxlock, snd_mtxunlock, speed, VIA8233_DXS_RATEFMT_48K, VIA8233_RP_DXS_RATEFMT, via_rd(), and via_wr().

Here is the call graph for this function:

◆ via8233msgd_getcaps()

static struct pcmchan_caps * via8233msgd_getcaps ( kobj_t  obj,
void *  data 
)
static

◆ via8233msgd_init()

static void * via8233msgd_init ( kobj_t  obj,
void *  devinfo,
struct snd_dbuf b,
struct pcm_channel c,
int  dir 
)
static

◆ via8233msgd_setformat()

static int via8233msgd_setformat ( kobj_t  obj,
void *  data,
uint32_t  format 
)
static

◆ via8233msgd_setspeed()

static uint32_t via8233msgd_setspeed ( kobj_t  obj,
void *  data,
uint32_t  speed 
)
static

Definition at line 506 of file via8233.c.

References AC97_EXTCAP_VRA, AC97_REGEXT_FDACRATE, ac97_setrate(), via_info::codec, via_info::codec_caps, data, via_chinfo::parent, and speed.

Here is the call graph for this function:

◆ via8233wr_getcaps()

static struct pcmchan_caps * via8233wr_getcaps ( kobj_t  obj,
void *  data 
)
static

◆ via8233wr_init()

static void * via8233wr_init ( kobj_t  obj,
void *  devinfo,
struct snd_dbuf b,
struct pcm_channel c,
int  dir 
)
static

◆ via8233wr_setformat()

static int via8233wr_setformat ( kobj_t  obj,
void *  data,
uint32_t  format 
)
static

Definition at line 405 of file via8233.c.

References AFMT_CHANNEL, data, format, via_info::lock, via_chinfo::parent, snd_mtxlock, snd_mtxunlock, via_wr(), VIA_WR0_FORMAT, WR_FORMAT_16BIT, WR_FORMAT_STEREO, and WR_FORMAT_STOP_INDEX.

Here is the call graph for this function:

◆ via8233wr_setspeed()

static uint32_t via8233wr_setspeed ( kobj_t  obj,
void *  data,
uint32_t  speed 
)
static

Definition at line 474 of file via8233.c.

References AC97_EXTCAP_VRA, AC97_REGEXT_LADCRATE, ac97_setrate(), via_info::codec, via_info::codec_caps, data, via_chinfo::parent, and speed.

Here is the call graph for this function:

◆ via_attach()

◆ via_buildsgdt()

static int via_buildsgdt ( struct via_chinfo ch)
static

Definition at line 385 of file via8233.c.

References via_chinfo::blkcnt, via_chinfo::blksz, via_chinfo::buffer, via_dma_op::flags, via_dma_op::ptr, via_chinfo::sgd_table, sndbuf_getbufaddr(), VIA_DMAOP_EOL, and VIA_DMAOP_FLAG.

Referenced by via8233chan_trigger().

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

◆ via_chan_active()

static __inline int via_chan_active ( struct via_info via)
static

Definition at line 143 of file via8233.c.

References via_chinfo::active, NDXSCHANS, NMSGDCHANS, NWRCHANS, via_info::pch, and via_info::rch.

Referenced by sysctl_via_polling(), via8233chan_trigger(), and via_poll_callback().

Here is the caller graph for this function:

◆ via_chip_init()

static int via_chip_init ( device_t  dev)
static

Definition at line 1111 of file via8233.c.

References data, dev, VIA_PCI_ACLINK_C00_READY, VIA_PCI_ACLINK_CTRL, VIA_PCI_ACLINK_DESIRED, VIA_PCI_ACLINK_EN, VIA_PCI_ACLINK_NRST, VIA_PCI_ACLINK_STAT, and VIA_PCI_ACLINK_SYNC.

Referenced by via_attach().

Here is the caller graph for this function:

◆ via_detach()

◆ via_init_sysctls()

static void via_init_sysctls ( device_t  dev)
static

Definition at line 253 of file via8233.c.

References dev, sysctl_via8233_dxs_src(), sysctl_via8233_spdif_enable(), and sysctl_via_polling().

Referenced by via_attach().

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

◆ via_intr()

◆ via_poll_callback()

static void via_poll_callback ( void *  arg)
static

Definition at line 803 of file via8233.c.

References via_chinfo::channel, chn_intr(), via_info::lock, NDXSCHANS, NMSGDCHANS, NWRCHANS, via_info::pch, via_info::poll_timer, via_info::polling, via_info::rch, snd_mtxlock, snd_mtxunlock, via_chan_active(), via_poll_callback(), and via_poll_channel().

Referenced by via8233chan_trigger(), and via_poll_callback().

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

◆ via_poll_channel()

static __inline int via_poll_channel ( struct via_chinfo ch)
static

Definition at line 773 of file via8233.c.

References via_chinfo::active, via_chinfo::blkcnt, blksz, via_chinfo::blksz, via_chinfo::channel, count, index, via_chinfo::parent, via_chinfo::prevptr, via_chinfo::ptr, via_chinfo::rbase, via_rd(), and VIA_RP_CURRENT_COUNT.

Referenced by via_poll_callback().

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

◆ via_poll_ticks()

static int via_poll_ticks ( struct via_info via)
static

Definition at line 843 of file via8233.c.

References via_chinfo::active, via_chinfo::blksz, via_chinfo::buffer, via_chinfo::channel, NDXSCHANS, NMSGDCHANS, NWRCHANS, via_info::pch, via_info::rch, sndbuf_getalign(), and sndbuf_getspd().

Referenced by via8233chan_trigger().

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

◆ via_probe()

◆ via_rd()

static __inline uint32_t via_rd ( struct via_info via,
int  regno,
int  size 
)
static

◆ via_read_codec()

static int via_read_codec ( kobj_t  obj,
void *  addr,
int  reg 
)
static

Definition at line 356 of file via8233.c.

References addr, reg, VIA_AC97_CODEC00_VALID, VIA_AC97_CONTROL, VIA_AC97_INDEX, VIA_AC97_READ, via_rd(), via_waitready_codec(), via_waitvalid_codec(), and via_wr().

Here is the call graph for this function:

◆ via_waitready_codec()

static int via_waitready_codec ( struct via_info via)
static

Definition at line 311 of file via8233.c.

References via_info::dev, VIA_AC97_BUSY, VIA_AC97_CONTROL, and via_rd().

Referenced by via_read_codec(), and via_write_codec().

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

◆ via_waitvalid_codec()

static int via_waitvalid_codec ( struct via_info via)
static

Definition at line 326 of file via8233.c.

References via_info::dev, VIA_AC97_CODEC00_VALID, VIA_AC97_CONTROL, and via_rd().

Referenced by via_read_codec().

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

◆ via_wr()

static __inline void via_wr ( struct via_info via,
int  regno,
uint32_t  data,
int  size 
)
static

◆ via_write_codec()

static int via_write_codec ( kobj_t  obj,
void *  addr,
int  reg,
uint32_t  val 
)
static

Definition at line 341 of file via8233.c.

References addr, reg, val, VIA_AC97_CODEC00_VALID, VIA_AC97_CONTROL, VIA_AC97_DATA, VIA_AC97_INDEX, via_waitready_codec(), and via_wr().

Here is the call graph for this function:

Variable Documentation

◆ via8233dxs_methods

kobj_method_t via8233dxs_methods[]
static
Initial value:
= {
KOBJMETHOD(channel_init, via8233dxs_init),
KOBJMETHOD(channel_setformat, via8233dxs_setformat),
KOBJMETHOD(channel_setspeed, via8233dxs_setspeed),
KOBJMETHOD(channel_getcaps, via8233dxs_getcaps),
KOBJMETHOD(channel_setblocksize, via8233chan_setblocksize),
KOBJMETHOD(channel_setfragments, via8233chan_setfragments),
KOBJMETHOD(channel_trigger, via8233chan_trigger),
KOBJMETHOD(channel_getptr, via8233chan_getptr),
}
#define KOBJMETHOD_END
Definition: midi.c:76
static uint32_t via8233dxs_setspeed(kobj_t obj, void *data, uint32_t speed)
Definition: via8233.c:486
static int via8233dxs_setformat(kobj_t obj, void *data, uint32_t format)
Definition: via8233.c:424
static uint32_t via8233chan_setblocksize(kobj_t obj, void *data, uint32_t blksz)
Definition: via8233.c:604
static void * via8233dxs_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
Definition: via8233.c:689
static struct pcmchan_caps * via8233dxs_getcaps(kobj_t obj, void *data)
Definition: via8233.c:533
static uint32_t via8233chan_getptr(kobj_t obj, void *data)
Definition: via8233.c:615
static int via8233chan_setfragments(kobj_t obj, void *data, uint32_t blksz, uint32_t blkcnt)
Definition: via8233.c:565
static int via8233chan_trigger(kobj_t obj, void *data, int go)
Definition: via8233.c:886

Definition at line 981 of file via8233.c.

◆ via8233msgd_methods

kobj_method_t via8233msgd_methods[]
static
Initial value:
= {
KOBJMETHOD(channel_init, via8233msgd_init),
KOBJMETHOD(channel_setformat, via8233msgd_setformat),
KOBJMETHOD(channel_setspeed, via8233msgd_setspeed),
KOBJMETHOD(channel_getcaps, via8233msgd_getcaps),
KOBJMETHOD(channel_setblocksize, via8233chan_setblocksize),
KOBJMETHOD(channel_setfragments, via8233chan_setfragments),
KOBJMETHOD(channel_trigger, via8233chan_trigger),
KOBJMETHOD(channel_getptr, via8233chan_getptr),
}
static uint32_t via8233msgd_setspeed(kobj_t obj, void *data, uint32_t speed)
Definition: via8233.c:506
static int via8233msgd_setformat(kobj_t obj, void *data, uint32_t format)
Definition: via8233.c:446
static struct pcmchan_caps * via8233msgd_getcaps(kobj_t obj, void *data)
Definition: via8233.c:550
static void * via8233msgd_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
Definition: via8233.c:726

Definition at line 994 of file via8233.c.

◆ via8233wr_methods

kobj_method_t via8233wr_methods[]
static
Initial value:
= {
KOBJMETHOD(channel_init, via8233wr_init),
KOBJMETHOD(channel_setformat, via8233wr_setformat),
KOBJMETHOD(channel_setspeed, via8233wr_setspeed),
KOBJMETHOD(channel_getcaps, via8233wr_getcaps),
KOBJMETHOD(channel_setblocksize, via8233chan_setblocksize),
KOBJMETHOD(channel_setfragments, via8233chan_setfragments),
KOBJMETHOD(channel_trigger, via8233chan_trigger),
KOBJMETHOD(channel_getptr, via8233chan_getptr),
}
static uint32_t via8233wr_setspeed(kobj_t obj, void *data, uint32_t speed)
Definition: via8233.c:474
static int via8233wr_setformat(kobj_t obj, void *data, uint32_t format)
Definition: via8233.c:405
static void * via8233wr_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
Definition: via8233.c:658
static struct pcmchan_caps * via8233wr_getcaps(kobj_t obj, void *data)
Definition: via8233.c:521

Definition at line 968 of file via8233.c.

◆ via_ac97_methods

kobj_method_t via_ac97_methods[]
static
Initial value:
= {
KOBJMETHOD(ac97_read, via_read_codec),
KOBJMETHOD(ac97_write, via_write_codec),
}
static int via_read_codec(kobj_t obj, void *addr, int reg)
Definition: via8233.c:356
static int via_write_codec(kobj_t obj, void *addr, int reg, uint32_t val)
Definition: via8233.c:341

Definition at line 375 of file via8233.c.

◆ via_caps

struct pcmchan_caps via_caps = { 48000, 48000, via_fmt, 0 }
static

Definition at line 140 of file via8233.c.

Referenced by via8233dxs_getcaps(), via8233msgd_getcaps(), and via8233wr_getcaps().

◆ via_driver

driver_t via_driver
static
Initial value:
= {
"pcm",
}
#define PCM_SOFTC_SIZE
Definition: sound.h:96
static device_method_t via_methods[]
Definition: via8233.c:1430

Definition at line 1437 of file via8233.c.

◆ via_fmt

uint32_t via_fmt[]
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 131 of file via8233.c.

◆ via_methods

device_method_t via_methods[]
static
Initial value:
= {
DEVMETHOD(device_probe, via_probe),
DEVMETHOD(device_attach, via_attach),
DEVMETHOD(device_detach, via_detach),
{ 0, 0}
}
static int via_attach(device_t dev)
Definition: via8233.c:1166
static int via_detach(device_t dev)
Definition: via8233.c:1399
static int via_probe(device_t dev)
Definition: via8233.c:1069

Definition at line 1430 of file via8233.c.

◆ via_vracaps

struct pcmchan_caps via_vracaps = { 4000, 48000, via_fmt, 0 }
static

Definition at line 139 of file via8233.c.

Referenced by via8233dxs_getcaps(), via8233msgd_getcaps(), and via8233wr_getcaps().