#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/malloc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <machine/dbdma.h>
#include <machine/intr_machdep.h>
#include <machine/resource.h>
#include <machine/bus.h>
#include <machine/pio.h>
#include <sys/rman.h>
#include <dev/iicbus/iicbus.h>
#include <dev/iicbus/iiconf.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/sound/pcm/sound.h>
#include "mixer_if.h"
Go to the source code of this file.
|
static int | onyx_probe (device_t) |
|
static int | onyx_attach (device_t) |
|
static int | onyx_init (struct snd_mixer *m) |
|
static int | onyx_uninit (struct snd_mixer *m) |
|
static int | onyx_reinit (struct snd_mixer *m) |
|
static int | onyx_set (struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) |
|
static u_int32_t | onyx_setrecsrc (struct snd_mixer *m, u_int32_t src) |
|
| DRIVER_MODULE (onyx, iicbus, onyx_driver, onyx_devclass, 0, 0) |
|
| MODULE_VERSION (onyx, 1) |
|
| MODULE_DEPEND (onyx, iicbus, 1, 1, 1) |
|
| MIXER_DECLARE (onyx_mixer) |
|
static int | onyx_write (struct onyx_softc *sc, uint8_t reg, const uint8_t value) |
|
◆ PCM3052_DAC_FILTER_ALWAYS
#define PCM3052_DAC_FILTER_ALWAYS (1 << 2) |
◆ PCM3052_HPF_ALWAYS
#define PCM3052_HPF_ALWAYS (1 << 2) |
◆ PCM3052_IICADDR
#define PCM3052_IICADDR 0x8C /* Hard-coded I2C slave addr */ |
◆ PCM3052_MRST
#define PCM3052_MRST (1 << 7) |
◆ PCM3052_MUTE_L
#define PCM3052_MUTE_L (1 << 1) |
◆ PCM3052_MUTE_R
#define PCM3052_MUTE_R (1 << 0) |
◆ PCM3052_OVR1
#define PCM3052_OVR1 (1 << 6) |
◆ PCM3052_REG_ADC_CONTROL
#define PCM3052_REG_ADC_CONTROL 72 |
◆ PCM3052_REG_ADC_HPF_BP
#define PCM3052_REG_ADC_HPF_BP 75 |
◆ PCM3052_REG_CONTROL
#define PCM3052_REG_CONTROL 67 |
◆ PCM3052_REG_DAC_CONTROL
#define PCM3052_REG_DAC_CONTROL 68 |
◆ PCM3052_REG_DAC_DEEMPH
#define PCM3052_REG_DAC_DEEMPH 69 |
◆ PCM3052_REG_DAC_FILTER
#define PCM3052_REG_DAC_FILTER 70 |
◆ PCM3052_REG_INFO_1
#define PCM3052_REG_INFO_1 77 |
◆ PCM3052_REG_INFO_2
#define PCM3052_REG_INFO_2 78 |
◆ PCM3052_REG_INFO_3
#define PCM3052_REG_INFO_3 79 |
◆ PCM3052_REG_INFO_4
#define PCM3052_REG_INFO_4 80 |
◆ PCM3052_REG_LEFT_ATTN
#define PCM3052_REG_LEFT_ATTN 65 |
◆ PCM3052_REG_OUT_PHASE
#define PCM3052_REG_OUT_PHASE 71 |
◆ PCM3052_REG_RIGHT_ATTN
#define PCM3052_REG_RIGHT_ATTN 66 |
◆ PCM3052_SRST
#define PCM3052_SRST (1 << 6) |
◆ DRIVER_MODULE()
◆ MIXER_DECLARE()
MIXER_DECLARE |
( |
onyx_mixer |
| ) |
|
◆ MODULE_DEPEND()
MODULE_DEPEND |
( |
onyx |
, |
|
|
iicbus |
, |
|
|
1 |
, |
|
|
1 |
, |
|
|
1 |
|
|
) |
| |
◆ MODULE_VERSION()
MODULE_VERSION |
( |
onyx |
, |
|
|
1 |
|
|
) |
| |
◆ onyx_attach()
static int onyx_attach |
( |
device_t |
dev | ) |
|
|
static |
◆ onyx_init()
Definition at line 230 of file onyx.c.
References onyx_reg::ADC_CONTROL, onyx_reg::ADC_HPF_BP, onyx_reg::CONTROL, onyx_reg::DAC_CONTROL, onyx_reg::DAC_DEEMPH, onyx_reg::DAC_FILTER, onyx_reg::INFO_1, onyx_reg::INFO_2, onyx_reg::INFO_3, onyx_reg::INFO_4, onyx_reg::LEFT_ATTN, m, mix_getdevinfo(), mix_setdevs(), onyx_initdata, onyx_write(), onyx_reg::OUT_PHASE, PCM3052_REG_ADC_CONTROL, PCM3052_REG_ADC_HPF_BP, PCM3052_REG_CONTROL, PCM3052_REG_DAC_CONTROL, PCM3052_REG_DAC_DEEMPH, PCM3052_REG_DAC_FILTER, PCM3052_REG_INFO_1, PCM3052_REG_INFO_2, PCM3052_REG_INFO_3, PCM3052_REG_INFO_4, PCM3052_REG_LEFT_ATTN, PCM3052_REG_OUT_PHASE, PCM3052_REG_RIGHT_ATTN, and onyx_reg::RIGHT_ATTN.
◆ onyx_probe()
static int onyx_probe |
( |
device_t |
dev | ) |
|
|
static |
◆ onyx_reinit()
static int onyx_reinit |
( |
struct snd_mixer * |
m | ) |
|
|
static |
◆ onyx_set()
static int onyx_set |
( |
struct snd_mixer * |
m, |
|
|
unsigned |
dev, |
|
|
unsigned |
left, |
|
|
unsigned |
right |
|
) |
| |
|
static |
◆ onyx_setrecsrc()
static u_int32_t onyx_setrecsrc |
( |
struct snd_mixer * |
m, |
|
|
u_int32_t |
src |
|
) |
| |
|
static |
◆ onyx_uninit()
static int onyx_uninit |
( |
struct snd_mixer * |
m | ) |
|
|
static |
◆ onyx_write()
static int onyx_write |
( |
struct onyx_softc * |
sc, |
|
|
uint8_t |
reg, |
|
|
const uint8_t |
value |
|
) |
| |
|
static |
◆ i2s_mixer
◆ i2s_mixer_class
kobj_class_t i2s_mixer_class |
|
extern |
◆ onyx_devclass
◆ onyx_driver
Initial value:= {
"onyx",
}
static device_method_t onyx_methods[]
Definition at line 88 of file onyx.c.
◆ onyx_initdata
Initial value:= {
0x80,
0x80,
0,
0,
0,
(-1 + 8) & 0xf,
(1 << 2),
2,
0,
1
}
#define PCM3052_DAC_FILTER_ALWAYS
#define PCM3052_HPF_ALWAYS
Definition at line 153 of file onyx.c.
Referenced by onyx_init().
◆ onyx_methods
device_method_t onyx_methods[] |
|
static |
Initial value:= {
{ 0, 0 }
}
static int onyx_attach(device_t)
static int onyx_probe(device_t)
Definition at line 81 of file onyx.c.
◆ onyx_mixer_methods
kobj_method_t onyx_mixer_methods[] |
|
static |
Initial value:= {
}
static int mixer_setrecsrc(struct snd_mixer *mixer, u_int32_t src)
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)
int mixer_uninit(device_t dev)
int mixer_reinit(device_t dev)
static int onyx_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right)
static int onyx_reinit(struct snd_mixer *m)
static int onyx_uninit(struct snd_mixer *m)
static int onyx_init(struct snd_mixer *m)
static u_int32_t onyx_setrecsrc(struct snd_mixer *m, u_int32_t src)
Definition at line 99 of file onyx.c.