Linux Kernel
3.7.1
|
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/export.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/control.h>
#include <sound/ac97_codec.h>
#include <sound/asoundef.h>
#include "ac97_id.h"
#include "ac97_local.h"
Go to the source code of this file.
Functions | |
int | snd_ac97_set_rate (struct snd_ac97 *ac97, int reg, unsigned int rate) |
EXPORT_SYMBOL (snd_ac97_set_rate) | |
int | snd_ac97_pcm_assign (struct snd_ac97_bus *bus, unsigned short pcms_count, const struct ac97_pcm *pcms) |
EXPORT_SYMBOL (snd_ac97_pcm_assign) | |
int | snd_ac97_pcm_open (struct ac97_pcm *pcm, unsigned int rate, enum ac97_pcm_cfg cfg, unsigned short slots) |
EXPORT_SYMBOL (snd_ac97_pcm_open) | |
int | snd_ac97_pcm_close (struct ac97_pcm *pcm) |
EXPORT_SYMBOL (snd_ac97_pcm_close) | |
int | snd_ac97_pcm_double_rate_rules (struct snd_pcm_runtime *runtime) |
EXPORT_SYMBOL (snd_ac97_pcm_double_rate_rules) | |
EXPORT_SYMBOL | ( | snd_ac97_set_rate | ) |
EXPORT_SYMBOL | ( | snd_ac97_pcm_assign | ) |
EXPORT_SYMBOL | ( | snd_ac97_pcm_open | ) |
EXPORT_SYMBOL | ( | snd_ac97_pcm_close | ) |
EXPORT_SYMBOL | ( | snd_ac97_pcm_double_rate_rules | ) |
int snd_ac97_pcm_assign | ( | struct snd_ac97_bus * | bus, |
unsigned short | pcms_count, | ||
const struct ac97_pcm * | pcms | ||
) |
snd_ac97_pcm_assign - assign AC97 slots to given PCM streams : the ac97 bus instance : count of PCMs to be assigned : PCMs to be assigned
It assigns available AC97 slots for given PCMs. If none or only some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members are reduced and might be zero.
Definition at line 444 of file ac97_pcm.c.
snd_ac97_pcm_close - closes the given AC97 pcm : the ac97 pcm instance
It frees the locked AC97 slots.
Definition at line 648 of file ac97_pcm.c.
int snd_ac97_pcm_double_rate_rules | ( | struct snd_pcm_runtime * | runtime | ) |
int snd_ac97_pcm_open | ( | struct ac97_pcm * | pcm, |
unsigned int | rate, | ||
enum ac97_pcm_cfg | cfg, | ||
unsigned short | slots | ||
) |
snd_ac97_pcm_open - opens the given AC97 pcm : the ac97 pcm instance : rate in Hz, if codec does not support VRA, this value must be 48000Hz : output stream characteristics : a subset of allocated slots (snd_ac97_pcm_assign) for this pcm
It locks the specified slots and sets the given rate to AC97 registers.
Definition at line 566 of file ac97_pcm.c.
snd_ac97_set_rate - change the rate of the given input/output. : the ac97 instance : the register to change : the sample rate to set
Changes the rate of the given input/output on the codec. If the codec doesn't support VAR, the rate must be 48000 (except for SPDIF).
The valid registers are AC97_PMC_MIC_ADC_RATE, AC97_PCM_FRONT_DAC_RATE, AC97_PCM_LR_ADC_RATE. AC97_PCM_SURR_DAC_RATE and AC97_PCM_LFE_DAC_RATE are accepted if the codec supports them. AC97_SPDIF is accepted as a pseudo register to modify the SPDIF status bits.
Returns zero if successful, or a negative error code on failure.
Definition at line 258 of file ac97_pcm.c.