85 unsigned int src,
unsigned short data)
99 ((offs +
src + 128 *
dst) *
sizeof(uint32_t)),
129 mask = SOUND_MASK_PCM;
132 mask |= SOUND_MASK_VOLUME;
135 mask |= SOUND_MASK_RECLEV;
156 device_printf(scp->
dev,
"hdspemixer_set() %d %d\n",
160 for (i = 0; i < scp->
chnum; i++) {
213 if ((err = device_get_children(sc->
dev, &devlist, &devcount)) != 0)
216 for (i = 0; i < devcount; i++) {
217 scp = device_get_ivars(devlist[i]);
218 for (j = 0; j < scp->
chnum; j++) {
225 free(devlist, M_TEMP);
231 device_printf(sc->
dev,
"hdspe is running\n");
234 free(devlist, M_TEMP);
294 for (i = 0; i < sc->
period * 2 ; i++) {
371 device_printf(scp->
dev,
"Can't setup sndbuf.\n");
393 device_printf(scp->
dev,
"hdspechan_trigger(): start\n");
403 device_printf(scp->
dev,
"hdspechan_trigger(): stop or abort\n");
457 device_printf(scp->
dev,
"hdspechan_free()\n");
479 device_printf(scp->
dev,
"hdspechan_setformat(%d)\n",
format);
504 device_printf(scp->
dev,
"hdspechan_setspeed(%d)\n",
speed);
522 if (
speed < threshold)
545 else if (
speed > 48000)
574 device_printf(scp->
dev,
"hdspechan_setblocksize(%d)\n",
blocksize);
613 device_printf(scp->
dev,
"New period=%d\n", sc->
period);
648 device_printf(scp->dev,
"hdspechan_getcaps()\n");
673 device_printf(
dev,
"hdspe_pcm_probe()\n");
688 for (i = 0; i < scp->
chnum; i++) {
706 scp = device_get_ivars(
dev);
711 device_set_desc_copy(
dev,
desc);
721 device_printf(
dev,
"Can't register pcm.\n");
726 for (i = 0; i < scp->
hc->
play; i++) {
731 for (i = 0; i < scp->
hc->
rec; i++) {
737 rman_get_start(scp->
sc->
cs),
738 rman_get_start(scp->
sc->
irq),
754 device_printf(
dev,
"Can't unregister device.\n");
int sndbuf_setup(struct snd_dbuf *b, void *buf, unsigned int size)
unsigned int sndbuf_getblksz(struct snd_dbuf *b)
unsigned int sndbuf_getfreeptr(struct snd_dbuf *b)
unsigned int sndbuf_getready(struct snd_dbuf *b)
int sndbuf_resize(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz)
unsigned int sndbuf_getreadyptr(struct snd_dbuf *b)
void chn_intr(struct pcm_channel *c)
struct pcmchan_matrix * m
static void buffer_copy(struct sc_chinfo *ch)
static int hdspe_running(struct sc_info *sc)
static int hdspe_hw_mixer(struct sc_chinfo *ch, unsigned int dst, unsigned int src, unsigned short data)
static struct pcmchan_caps * hdspechan_getcaps(kobj_t obj, void *data)
static int hdspe_pcm_probe(device_t dev)
static void * hdspechan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
static uint32_t hdspechan_getptr(kobj_t obj, void *data)
static int clean(struct sc_chinfo *ch)
static int hdspemixer_init(struct snd_mixer *m)
static device_method_t hdspe_pcm_methods[]
static uint32_t hdspe_pfmt[]
static uint32_t hdspechan_setblocksize(kobj_t obj, void *data, uint32_t blocksize)
static int hdspe_pcm_detach(device_t dev)
static int hdspechan_setgain(struct sc_chinfo *ch)
static void hdspechan_enable(struct sc_chinfo *ch, int value)
static struct hdspe_rate rate_map[]
static int hdspechan_free(kobj_t obj, void *data)
static kobj_method_t hdspemixer_methods[]
SND_DECLARE_FILE("$FreeBSD$")
static uint32_t hdspe_pcm_intr(struct sc_pcminfo *scp)
MODULE_DEPEND(snd_hdspe, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER)
static struct pcmchan_caps hdspe_rcaps
static int hdspemixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right)
static int hdspe_pcm_attach(device_t dev)
static void hdspe_start_audio(struct sc_info *sc)
DRIVER_MODULE(snd_hdspe_pcm, hdspe, hdspe_pcm_driver, pcm_devclass, 0, 0)
MIXER_DECLARE(hdspemixer)
static kobj_method_t hdspechan_methods[]
static int hdspechan_trigger(kobj_t obj, void *data, int go)
static uint32_t hdspe_rfmt[]
static void hdspe_stop_audio(struct sc_info *sc)
static driver_t hdspe_pcm_driver
static struct hdspe_latency latency_map[]
CHANNEL_DECLARE(hdspechan)
MODULE_VERSION(snd_hdspe, 1)
static struct pcmchan_caps hdspe_pcaps
static uint32_t hdspechan_setspeed(kobj_t obj, void *data, uint32_t speed)
static int hdspechan_setformat(kobj_t obj, void *data, uint32_t format)
#define HDSPE_BUF_POSITION_MASK
#define HDSPE_CONTROL_REG
#define hdspe_write_1(sc, regno, data)
#define HDSPE_CHANBUF_SAMPLES
#define HDSPE_LAT_BYTES_MAX
#define hdspe_write_4(sc, regno, data)
#define HDSPE_OUT_ENABLE_BASE
#define HDSPE_AUDIO_INT_ENABLE
#define HDSPE_IN_ENABLE_BASE
#define HDSPE_LAT_BYTES_MIN
#define HDSPE_CHANBUF_SIZE
#define hdspe_read_2(sc, regno)
#define HDSPE_FREQ_DOUBLE
#define hdspe_encode_latency(x)
int mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
static int mixer_set(struct snd_mixer *m, u_int dev, u_int32_t muted, u_int lev)
void mix_setdevs(struct snd_mixer *m, u_int32_t v)
void * mix_getdevinfo(struct snd_mixer *m)
void pcm_setflags(device_t dev, uint32_t val)
uint32_t pcm_getflags(device_t dev)
int pcm_setstatus(device_t dev, char *str)
int pcm_addchan(device_t dev, int dir, kobj_class_t cls, void *devinfo)
int pcm_unregister(device_t dev)
int pcm_register(device_t dev, void *devinfo, int numplay, int numrec)
#define SND_FORMAT(f, c, e)
struct pcm_channel * channel
struct hdspe_channel * hc
uint32_t(* ih)(struct sc_pcminfo *scp)
struct sc_chinfo chan[HDSPE_MAX_CHANS]