FreeBSD kernel sound device code
|
#include "ac97_if.h"
Go to the source code of this file.
Macros | |
#define | AC97_MUTE 0x8080 |
#define | AC97_REG_RESET 0x00 |
#define | AC97_CAP_MICCHANNEL (1 << 0) |
#define | AC97_CAP_TONE (1 << 2) |
#define | AC97_CAP_SIMSTEREO (1 << 3) |
#define | AC97_CAP_HEADPHONE (1 << 4) |
#define | AC97_CAP_LOUDNESS (1 << 5) |
#define | AC97_CAP_DAC_18 (1 << 6) |
#define | AC97_CAP_DAC_20 (1 << 7) |
#define | AC97_CAP_ADC_18 (1 << 8) |
#define | AC97_CAP_ADC_20 (1 << 9) |
#define | AC97_MIX_MASTER 0x02 |
#define | AC97_MIX_AUXOUT 0x04 |
#define | AC97_MIX_MONO 0x06 |
#define | AC97_MIX_TONE 0x08 |
#define | AC97_MIX_BEEP 0x0a |
#define | AC97_MIX_PHONE 0x0c |
#define | AC97_MIX_MIC 0x0e |
#define | AC97_MIX_LINE 0x10 |
#define | AC97_MIX_CD 0x12 |
#define | AC97_MIX_VIDEO 0x14 |
#define | AC97_MIX_AUX 0x16 |
#define | AC97_MIX_PCM 0x18 |
#define | AC97_REG_RECSEL 0x1a |
#define | AC97_MIX_RGAIN 0x1c |
#define | AC97_MIX_MGAIN 0x1e |
#define | AC97_REG_GEN 0x20 |
#define | AC97_REG_3D 0x22 |
#define | AC97_REG_POWER 0x26 |
#define | AC97_POWER_ADC (1 << 0) |
#define | AC97_POWER_DAC (1 << 1) |
#define | AC97_POWER_ANL (1 << 2) |
#define | AC97_POWER_REF (1 << 3) |
#define | AC97_POWER_STATUS |
#define | AC97_REGEXT_ID 0x28 |
#define | AC97_EXTCAP_VRA (1 << 0) |
#define | AC97_EXTCAP_DRA (1 << 1) |
#define | AC97_EXTCAP_VRM (1 << 3) |
#define | AC97_EXTCAPS (AC97_EXTCAP_VRA | AC97_EXTCAP_DRA | AC97_EXTCAP_VRM) |
#define | AC97_EXTCAP_SDAC (1 << 7) |
#define | AC97_REGEXT_STAT 0x2a |
#define | AC97_REGEXT_FDACRATE 0x2c |
#define | AC97_REGEXT_SDACRATE 0x2e |
#define | AC97_REGEXT_LDACRATE 0x30 |
#define | AC97_REGEXT_LADCRATE 0x32 |
#define | AC97_REGEXT_MADCRATE 0x34 |
#define | AC97_MIXEXT_CLFE 0x36 |
#define | AC97_MIXEXT_SURROUND 0x38 |
#define | AC97_REG_ID1 0x7c |
#define | AC97_REG_ID2 0x7e |
#define | AC97_F_EAPD_INV 0x00000001 |
#define | AC97_F_RDCD_BUG 0x00000002 |
#define | AC97_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, sizeof(struct kobj)) |
#define | AC97_CREATE(dev, devinfo, cls) ac97_create(dev, devinfo, &cls ## _class) |
Functions | |
kobj_class_t | ac97_getmixerclass (void) |
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) |
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) |
u_int16_t | ac97_rdcd (struct ac97_info *codec, int reg) |
void | ac97_wrcd (struct ac97_info *codec, int reg, u_int16_t val) |
#define AC97_CREATE | ( | dev, | |
devinfo, | |||
cls | |||
) | ac97_create(dev, devinfo, &cls ## _class) |
#define AC97_DECLARE | ( | name | ) | static DEFINE_CLASS(name, name ## _methods, sizeof(struct kobj)) |
#define AC97_EXTCAPS (AC97_EXTCAP_VRA | AC97_EXTCAP_DRA | AC97_EXTCAP_VRM) |
#define AC97_POWER_STATUS |
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().
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().
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().
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().
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().
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().