FreeBSD kernel sound device code
|
#include <sys/cdefs.h>
#include "opt_platform.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/clock.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/module.h>
#include <sys/endian.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
#include <dev/sound/fdt/audio_dai.h>
#include <dev/sound/pcm/sound.h>
#include "audio_dai_if.h"
Go to the source code of this file.
Data Structures | |
struct | audio_soc_aux_node |
struct | audio_soc_channel |
struct | audio_soc_softc |
Macros | |
#define | AUDIO_BUFFER_SIZE 48000 * 4 |
Functions | |
__FBSDID ("$FreeBSD$") | |
static int | audio_soc_probe (device_t dev) |
static int | audio_soc_attach (device_t dev) |
static int | audio_soc_detach (device_t dev) |
static uint32_t | audio_soc_reverse_clocks (uint32_t format) |
static uint32_t | audio_soc_chan_setblocksize (kobj_t obj, void *data, uint32_t blocksz) |
static int | audio_soc_chan_setformat (kobj_t obj, void *data, uint32_t format) |
static uint32_t | audio_soc_chan_setspeed (kobj_t obj, void *data, uint32_t speed) |
static uint32_t | audio_soc_chan_getptr (kobj_t obj, void *data) |
static void * | audio_soc_chan_init (kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) |
static int | audio_soc_chan_trigger (kobj_t obj, void *data, int go) |
static int | audio_soc_chan_free (kobj_t obj, void *data) |
static struct pcmchan_caps * | audio_soc_chan_getcaps (kobj_t obj, void *data) |
CHANNEL_DECLARE (audio_soc_chan) | |
static void | audio_soc_intr (void *arg) |
static void | audio_soc_init (void *arg) |
DRIVER_MODULE (audio_soc, simplebus, audio_soc_driver, pcm_devclass, NULL, NULL) | |
MODULE_VERSION (audio_soc, 1) | |
Variables | |
static struct ofw_compat_data | compat_data [] |
struct { | |
const char * name | |
unsigned int fmt | |
} | ausoc_dai_formats [] |
static kobj_method_t | audio_soc_chan_methods [] |
static device_method_t | audio_soc_methods [] |
static driver_t | audio_soc_driver |
#define AUDIO_BUFFER_SIZE 48000 * 4 |
Definition at line 47 of file audio_soc.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 423 of file audio_soc.c.
References AUDIO_DAI_CLOCK_CBM_CFM, AUDIO_DAI_CLOCK_CBM_CFS, AUDIO_DAI_CLOCK_CBS_CFM, AUDIO_DAI_CLOCK_CBS_CFS, AUDIO_DAI_FORMAT, AUDIO_DAI_FORMAT_I2S, AUDIO_DAI_POLARITY_IB_IF, AUDIO_DAI_POLARITY_IB_NF, AUDIO_DAI_POLARITY_NB_IF, AUDIO_DAI_POLARITY_NB_NF, audio_soc_init(), ausoc_dai_formats, audio_soc_softc::dev, dev, fmt, audio_soc_softc::init_hook, audio_soc_softc::name, and name.
|
static |
Definition at line 246 of file audio_soc.c.
References audio_soc_channel::buf, buffer, data, free, and sndbuf_getbuf().
|
static |
Definition at line 262 of file audio_soc.c.
References audio_soc_softc::cpu_dev, data, and audio_soc_channel::sc.
|
static |
Definition at line 195 of file audio_soc.c.
References audio_soc_softc::cpu_dev, data, audio_soc_channel::dir, and audio_soc_channel::sc.
|
static |
Definition at line 207 of file audio_soc.c.
References AUDIO_BUFFER_SIZE, b, audio_soc_channel::buf, buffer, c, devinfo, audio_soc_channel::dir, dir, free, audio_soc_channel::pcm, and sndbuf_setup().
|
static |
Definition at line 137 of file audio_soc.c.
|
static |
Definition at line 144 of file audio_soc.c.
References audio_soc_softc::cpu_dev, data, format, and audio_soc_channel::sc.
|
static |
Definition at line 157 of file audio_soc.c.
References AUDIO_DAI_CLOCK_IN, AUDIO_DAI_CLOCK_OUT, audio_soc_softc::codec_dev, audio_soc_softc::cpu_dev, data, audio_soc_softc::dev, rate, audio_soc_channel::sc, and speed.
|
static |
Definition at line 229 of file audio_soc.c.
References audio_soc_softc::codec_dev, audio_soc_softc::cpu_dev, data, audio_soc_channel::dir, go, and audio_soc_channel::sc.
|
static |
Definition at line 507 of file audio_soc.c.
References dev, free, and audio_soc_softc::name.
|
static |
Definition at line 316 of file audio_soc.c.
References audio_soc_intr(), audio_soc_reverse_clocks(), child, audio_soc_softc::codec_dev, audio_soc_softc::cpu_dev, audio_soc_softc::dev, audio_soc_softc::init_hook, pcm_addchan(), pcm_register(), pcm_setstatus(), PCMDIR_PLAY, and PCMDIR_REC.
Referenced by audio_soc_attach().
|
static |
Definition at line 287 of file audio_soc.c.
References AUDIO_DAI_PLAY_INTR, AUDIO_DAI_REC_INTR, chn_intr(), and audio_soc_softc::cpu_dev.
Referenced by audio_soc_init().
|
static |
Definition at line 301 of file audio_soc.c.
References compat_data, and dev.
|
static |
Definition at line 110 of file audio_soc.c.
References AUDIO_DAI_CLOCK_CBM_CFM, AUDIO_DAI_CLOCK_CBM_CFS, AUDIO_DAI_CLOCK_CBS_CFM, AUDIO_DAI_CLOCK_CBS_CFS, AUDIO_DAI_FORMAT, AUDIO_DAI_FORMAT_CLOCK, AUDIO_DAI_FORMAT_FORMAT, AUDIO_DAI_FORMAT_POLARITY, fmt, and format.
Referenced by audio_soc_init().
CHANNEL_DECLARE | ( | audio_soc_chan | ) |
DRIVER_MODULE | ( | audio_soc | , |
simplebus | , | ||
audio_soc_driver | , | ||
pcm_devclass | , | ||
NULL | , | ||
NULL | |||
) |
MODULE_VERSION | ( | audio_soc | , |
1 | |||
) |
|
static |
Definition at line 273 of file audio_soc.c.
|
static |
Definition at line 533 of file audio_soc.c.
|
static |
Definition at line 524 of file audio_soc.c.
struct { ... } ausoc_dai_formats[] |
Referenced by audio_soc_attach().
|
static |
Definition at line 84 of file audio_soc.c.
Referenced by audio_soc_probe().
unsigned int fmt |
Definition at line 91 of file audio_soc.c.
Referenced by ad1816chan_setformat(), audio_soc_attach(), audio_soc_reverse_clocks(), chn_reset(), emu_vsetup(), ess_setupch(), feeder_default_matrix(), hdaa_allowed_stripes(), hdaa_audio_setup(), hdaa_channel_start(), hdaa_eld_dump(), hdaa_stream_format(), hdac_bdata_rate(), hdac_mdata_rate(), snd_fmtbest(), snd_fmtbestbit(), snd_fmtbestchannel(), snd_fmtbestfunc(), snd_fmtscore(), snd_fmtvalid(), sndbuf_setfmt(), sndbuf_zerodata(), and tr_fmttobits().
const char* name |
Definition at line 90 of file audio_soc.c.
Referenced by aoagpio_probe(), audio_soc_attach(), davbus_probe(), envy24_pci_probe(), envy24ht_pci_probe(), i2s_probe(), ich_pci_probe(), mixer_clone(), mss_detect(), of_find_firstchild_byname(), onyx_probe(), snapper_probe(), and tumbler_probe().