FreeBSD kernel sound device code
|
#include <dev/sound/pcm/sound.h>
#include <dev/sound/pcm/ac97.h>
#include <dev/sound/pcm/ac97_patch.h>
#include <dev/pci/pcivar.h>
#include "mixer_if.h"
Go to the source code of this file.
Data Structures | |
struct | ac97mixtable_entry |
struct | ac97_info |
struct | ac97_vendorid |
struct | ac97_codecid |
Macros | |
#define | AC97_MIXER_SIZE SOUND_MIXER_NRDEVICES |
Functions | |
SND_DECLARE_FILE ("$FreeBSD$") | |
static | MALLOC_DEFINE (M_AC97, "ac97", "ac97 codec") |
u_int16_t | ac97_rdcd (struct ac97_info *codec, int reg) |
void | ac97_wrcd (struct ac97_info *codec, int reg, u_int16_t val) |
static void | ac97_reset (struct ac97_info *codec) |
int | ac97_setrate (struct ac97_info *codec, int which, int rate) |
int | ac97_setextmode (struct ac97_info *codec, u_int16_t mode) |
u_int16_t | ac97_getextmode (struct ac97_info *codec) |
u_int16_t | ac97_getextcaps (struct ac97_info *codec) |
u_int16_t | ac97_getcaps (struct ac97_info *codec) |
u_int32_t | ac97_getsubvendor (struct ac97_info *codec) |
static int | ac97_setrecsrc (struct ac97_info *codec, int channel) |
static int | ac97_setmixer (struct ac97_info *codec, unsigned channel, unsigned left, unsigned right) |
static void | ac97_fix_auxout (struct ac97_info *codec) |
static void | ac97_fix_tone (struct ac97_info *codec) |
static const char * | ac97_hw_desc (u_int32_t id, const char *vname, const char *cname, char *buf) |
static unsigned | ac97_initmixer (struct ac97_info *codec) |
static unsigned | ac97_reinitmixer (struct ac97_info *codec) |
struct ac97_info * | ac97_create (device_t dev, void *devinfo, kobj_class_t cls) |
void | ac97_destroy (struct ac97_info *codec) |
void | ac97_setflags (struct ac97_info *codec, u_int32_t val) |
u_int32_t | ac97_getflags (struct ac97_info *codec) |
static int | sysctl_hw_snd_ac97_eapd (SYSCTL_HANDLER_ARGS) |
static void | ac97_init_sysctl (struct ac97_info *codec) |
static int | ac97mix_init (struct snd_mixer *m) |
static int | ac97mix_uninit (struct snd_mixer *m) |
static int | ac97mix_reinit (struct snd_mixer *m) |
static int | ac97mix_set (struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) |
static u_int32_t | ac97mix_setrecsrc (struct snd_mixer *m, u_int32_t src) |
MIXER_DECLARE (ac97mixer) | |
kobj_class_t | ac97_getmixerclass (void) |
Variables | |
static const struct ac97mixtable_entry | ac97mixtable_default [AC97_MIXER_SIZE] |
static const struct ac97_vendorid | ac97vendorid [] |
static struct ac97_codecid | ac97codecid [] |
static char * | ac97enhancement [] |
static char * | ac97feature [] |
static char * | ac97extfeature [] |
static kobj_method_t | ac97mixer_methods [] |
struct ac97_info * ac97_create | ( | device_t | dev, |
void * | devinfo, | ||
kobj_class_t | cls | ||
) |
Definition at line 834 of file ac97.c.
References AC97_F_EAPD_INV, ac97_info::dev, dev, ac97_info::devinfo, devinfo, ac97_info::flags, ac97_info::lock, ac97_info::methods, ac97_info::name, pcm_getflags(), pcm_setflags(), SD_F_SOFTPCMVOL, and snd_mtxcreate().
void ac97_destroy | ( | struct ac97_info * | codec | ) |
Definition at line 860 of file ac97.c.
References free, ac97_info::lock, ac97_info::methods, snd_mtxfree(), and snd_mtxlock.
Referenced by ac97mix_uninit(), atiixp_release_resource(), cs4281_pci_attach(), emu_pci_attach(), emu_pcm_attach(), es_pci_attach(), fm801_pci_attach(), ich_pci_attach(), m3_pci_attach(), nm_pci_attach(), pcmcsa_attach(), tr_pci_attach(), and via_attach().
|
static |
Definition at line 518 of file ac97.c.
References AC97_EXTCAP_SDAC, AC97_MIX_AUXOUT, AC97_MIXEXT_SURROUND, ac97_rdcd(), ac97_info::extcaps, ac97_info::mix, and ac97mixtable_entry::reg.
Referenced by ac97_initmixer().
|
static |
Definition at line 553 of file ac97.c.
References AC97_CAP_TONE, ac97_info::caps, ac97_info::id, ac97_info::mix, and ac97_info::se.
Referenced by ac97_initmixer().
u_int16_t ac97_getcaps | ( | struct ac97_info * | codec | ) |
Definition at line 411 of file ac97.c.
References ac97_info::caps.
Referenced by emu_pci_attach(), and ich_pci_attach().
u_int16_t ac97_getextcaps | ( | struct ac97_info * | codec | ) |
Definition at line 405 of file ac97.c.
References ac97_info::extcaps.
Referenced by ich_pci_attach(), and via_attach().
u_int16_t ac97_getextmode | ( | struct ac97_info * | codec | ) |
Definition at line 399 of file ac97.c.
References ac97_info::extstat.
Referenced by via_attach().
u_int32_t ac97_getflags | ( | struct ac97_info * | codec | ) |
Definition at line 876 of file ac97.c.
References ac97_info::flags.
Referenced by atiixp_chip_post_init(), and ich_pci_attach().
kobj_class_t ac97_getmixerclass | ( | void | ) |
Definition at line 1097 of file ac97.c.
Referenced by atiixp_chip_post_init(), cs4281_pci_attach(), emu_pci_attach(), emu_pcm_attach(), es_pci_attach(), fm801_pci_attach(), ich_pci_attach(), m3_pci_attach(), nm_pci_attach(), pcmcsa_attach(), tr_pci_attach(), and via_attach().
u_int32_t ac97_getsubvendor | ( | struct ac97_info * | codec | ) |
Definition at line 417 of file ac97.c.
References ac97_info::subvendor.
Referenced by ad1981b_patch(), ad198x_patch(), alc655_patch(), and cmi9739_patch().
|
static |
Definition at line 582 of file ac97.c.
References buf.
Referenced by ac97_initmixer().
|
static |
Definition at line 912 of file ac97.c.
References ac97_rdcd(), AC97_REG_POWER, ac97_wrcd(), ac97_info::dev, ac97_info::lock, snd_mtxlock, snd_mtxunlock, sysctl_hw_snd_ac97_eapd(), and val.
Referenced by ac97mix_init().
|
static |
Definition at line 600 of file ac97.c.
References AC97_EXTCAPS, AC97_F_EAPD_INV, AC97_F_RDCD_BUG, ac97_fix_auxout(), ac97_fix_tone(), ac97_hw_desc(), AC97_MIX_BEEP, AC97_MIX_TONE, AC97_MIXER_SIZE, ac97_rdcd(), AC97_REG_ID1, AC97_REG_ID2, AC97_REG_POWER, AC97_REG_RESET, AC97_REGEXT_ID, AC97_REGEXT_STAT, ac97_reset(), ac97_wrcd(), ac97codecid, ac97enhancement, ac97extfeature, ac97feature, ac97mixtable_default, ac97vendorid, ac97mixtable_entry::bits, ac97_info::caps, ac97_info::count, desc, ac97_info::dev, ac97_info::devinfo, ac97mixtable_entry::enable, ac97_info::extcaps, ac97_info::extid, ac97_info::extstat, ac97_info::flags, id, ac97_info::id, ac97_vendorid::id, ac97_codecid::id, k, ac97_info::lock, ac97_info::methods, ac97_info::mix, model, ac97mixtable_entry::mute, ac97_vendorid::name, ac97_codecid::name, ac97_info::noext, ac97_codecid::noext, ac97mixtable_entry::ofs, ac97_codecid::patch, reg, ac97mixtable_entry::reg, ac97_info::se, snd_mtxlock, snd_mtxunlock, ac97_codecid::stepmask, and ac97_info::subvendor.
Referenced by ac97mix_init().
u_int16_t ac97_rdcd | ( | struct ac97_info * | codec, |
int | reg | ||
) |
Definition at line 311 of file ac97.c.
References AC97_F_RDCD_BUG, ac97_info::dev, ac97_info::devinfo, ac97_info::flags, ac97_info::methods, and reg.
Referenced by ac97_fix_auxout(), ac97_init_sysctl(), ac97_initmixer(), ac97_reinitmixer(), ac97_reset(), ac97_setextmode(), ac97_setmixer(), ac97_setrate(), ad1981b_patch(), ad198x_patch(), alc655_patch(), and sysctl_hw_snd_ac97_eapd().
|
static |
Definition at line 803 of file ac97.c.
References AC97_EXTCAPS, AC97_F_EAPD_INV, ac97_rdcd(), AC97_REG_POWER, AC97_REGEXT_STAT, ac97_reset(), ac97_wrcd(), ac97_info::count, ac97_info::dev, ac97_info::devinfo, ac97_info::extstat, ac97_info::flags, ac97_info::lock, ac97_info::methods, ac97_info::noext, snd_mtxlock, and snd_mtxunlock.
Referenced by ac97mix_reinit().
|
static |
Definition at line 338 of file ac97.c.
References AC97_POWER_STATUS, ac97_rdcd(), AC97_REG_POWER, AC97_REG_RESET, ac97_wrcd(), and ac97_info::dev.
Referenced by ac97_initmixer(), and ac97_reinitmixer().
int ac97_setextmode | ( | struct ac97_info * | codec, |
u_int16_t | mode | ||
) |
Definition at line 383 of file ac97.c.
References AC97_EXTCAPS, ac97_rdcd(), AC97_REGEXT_STAT, ac97_wrcd(), ac97_info::dev, ac97_info::extcaps, ac97_info::extstat, ac97_info::lock, snd_mtxlock, and snd_mtxunlock.
Referenced by ich_pci_attach(), ich_pci_resume(), and via_attach().
void ac97_setflags | ( | struct ac97_info * | codec, |
u_int32_t | val | ||
) |
Definition at line 870 of file ac97.c.
References ac97_info::flags, and val.
Referenced by atiixp_chip_post_init(), ich_pci_attach(), and pcmcsa_attach().
|
static |
Definition at line 439 of file ac97.c.
References AC97_MUTE, ac97_rdcd(), ac97_wrcd(), ac97mixtable_entry::bits, channel, ac97mixtable_entry::enable, left, ac97_info::lock, mask, ac97mixtable_entry::mask, max, ac97_info::mix, ac97mixtable_entry::mute, ac97mixtable_entry::ofs, reg, ac97mixtable_entry::reg, right, snd_mtxlock, snd_mtxunlock, ac97mixtable_entry::stereo, and val.
Referenced by ac97mix_set().
int ac97_setrate | ( | struct ac97_info * | codec, |
int | which, | ||
int | rate | ||
) |
Definition at line 352 of file ac97.c.
References AC97_EXTCAP_DRA, ac97_rdcd(), AC97_REGEXT_FDACRATE, AC97_REGEXT_LADCRATE, AC97_REGEXT_LDACRATE, AC97_REGEXT_MADCRATE, AC97_REGEXT_SDACRATE, ac97_wrcd(), ac97_info::extstat, ac97_info::lock, rate, snd_mtxlock, and snd_mtxunlock.
Referenced by ichchan_setspeed(), via8233msgd_setspeed(), via8233wr_setspeed(), and viachan_setspeed().
|
static |
Definition at line 423 of file ac97.c.
References AC97_REG_RECSEL, ac97_wrcd(), channel, ac97_info::lock, ac97_info::mix, ac97mixtable_entry::recidx, snd_mtxlock, snd_mtxunlock, and val.
Referenced by ac97mix_setrecsrc().
void ac97_wrcd | ( | struct ac97_info * | codec, |
int | reg, | ||
u_int16_t | val | ||
) |
Definition at line 332 of file ac97.c.
References ac97_info::devinfo, ac97_info::methods, reg, and val.
Referenced by ac97_init_sysctl(), ac97_initmixer(), ac97_reinitmixer(), ac97_reset(), ac97_setextmode(), ac97_setmixer(), ac97_setrate(), ac97_setrecsrc(), ac97mix_init(), ad1886_patch(), ad1981b_patch(), ad198x_patch(), alc655_patch(), cmi9739_patch(), and sysctl_hw_snd_ac97_eapd().
|
static |
Definition at line 935 of file ac97.c.
References ac97_init_sysctl(), ac97_initmixer(), AC97_MIX_MASTER, AC97_MIX_PCM, AC97_MIXER_SIZE, ac97_wrcd(), ac97_info::dev, ac97mixtable_entry::enable, ac97_info::id, m, mask, ac97_info::mix, mix_getdevinfo(), mix_setdevs(), mix_setparentchild(), mix_setrealdev(), mix_setrecdevs(), pcm_getflags(), pcm_setflags(), ac97mixtable_entry::recidx, SD_F_SOFTPCMVOL, and ac97_info::subvendor.
|
static |
Definition at line 1051 of file ac97.c.
References ac97_reinitmixer(), m, and mix_getdevinfo().
|
static |
Definition at line 1061 of file ac97.c.
References AC97_MIXER_SIZE, ac97_setmixer(), dev, left, m, mix_getdevinfo(), and right.
|
static |
Definition at line 1071 of file ac97.c.
References AC97_MIXER_SIZE, ac97_setrecsrc(), m, mix_getdevinfo(), and src.
|
static |
Definition at line 1036 of file ac97.c.
References ac97_destroy(), m, and mix_getdevinfo().
|
static |
MIXER_DECLARE | ( | ac97mixer | ) |
SND_DECLARE_FILE | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 884 of file ac97.c.
References AC97_F_EAPD_INV, ac97_rdcd(), AC97_REG_POWER, ac97_wrcd(), ac97_info::flags, ac97_info::id, ac97_info::lock, req, snd_mtxlock, snd_mtxunlock, and val.
Referenced by ac97_init_sysctl().
|
static |
Definition at line 138 of file ac97.c.
Referenced by ac97_initmixer().
|
static |
Definition at line 245 of file ac97.c.
Referenced by ac97_initmixer().
|
static |
Definition at line 293 of file ac97.c.
Referenced by ac97_initmixer().
|
static |
Definition at line 280 of file ac97.c.
Referenced by ac97_initmixer().
|
static |
|
static |
Definition at line 85 of file ac97.c.
Referenced by ac97_initmixer().
|
static |
Definition at line 105 of file ac97.c.
Referenced by ac97_initmixer().