aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/ac97_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 04:42:40 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:17:03 -0500
commitb9b4bdd9f1c98388f13591608d574650a9873717 (patch)
treede8fe568faae12494ba09852cc9a33dfea3a15ae /include/sound/ac97_codec.h
parent95a98265eb7b112b3268761053d643635171e219 (diff)
[ALSA] ac97 - Remove ac9_enum definition from public header
Modules: AC97 Codec Remove the definition of ac97_enum struct from the public ac97_codec.h. It's used only in the module. The location of struct ac97_pcm is moved closer to its accessor to improve readability. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/ac97_codec.h')
-rw-r--r--include/sound/ac97_codec.h65
1 files changed, 30 insertions, 35 deletions
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 7f0ca79d6c98..6f1e6ba2a190 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -396,33 +396,6 @@ typedef struct _snd_ac97_bus_ops ac97_bus_ops_t;
396typedef struct _snd_ac97_template ac97_template_t; 396typedef struct _snd_ac97_template ac97_template_t;
397typedef struct _snd_ac97 ac97_t; 397typedef struct _snd_ac97 ac97_t;
398 398
399enum ac97_pcm_cfg {
400 AC97_PCM_CFG_FRONT = 2,
401 AC97_PCM_CFG_REAR = 10, /* alias surround */
402 AC97_PCM_CFG_LFE = 11, /* center + lfe */
403 AC97_PCM_CFG_40 = 4, /* front + rear */
404 AC97_PCM_CFG_51 = 6, /* front + rear + center/lfe */
405 AC97_PCM_CFG_SPDIF = 20
406};
407
408/* PCM allocation */
409struct ac97_pcm {
410 ac97_bus_t *bus;
411 unsigned int stream: 1, /* stream type: 1 = capture */
412 exclusive: 1, /* exclusive mode, don't override with other pcms */
413 copy_flag: 1, /* lowlevel driver must fill all entries */
414 spdif: 1; /* spdif pcm */
415 unsigned short aslots; /* active slots */
416 unsigned int rates; /* available rates */
417 struct {
418 unsigned short slots; /* driver input: requested AC97 slot numbers */
419 unsigned short rslots[4]; /* allocated slots per codecs */
420 unsigned char rate_table[4];
421 ac97_t *codec[4]; /* allocated codecs */
422 } r[2]; /* 0 = standard rates, 1 = double rates */
423 unsigned long private_value; /* used by the hardware driver */
424};
425
426struct snd_ac97_build_ops { 399struct snd_ac97_build_ops {
427 int (*build_3d) (ac97_t *ac97); 400 int (*build_3d) (ac97_t *ac97);
428 int (*build_specific) (ac97_t *ac97); 401 int (*build_specific) (ac97_t *ac97);
@@ -581,6 +554,36 @@ struct ac97_quirk {
581int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override); 554int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override);
582int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate); 555int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate);
583 556
557/*
558 * PCM allocation
559 */
560
561enum ac97_pcm_cfg {
562 AC97_PCM_CFG_FRONT = 2,
563 AC97_PCM_CFG_REAR = 10, /* alias surround */
564 AC97_PCM_CFG_LFE = 11, /* center + lfe */
565 AC97_PCM_CFG_40 = 4, /* front + rear */
566 AC97_PCM_CFG_51 = 6, /* front + rear + center/lfe */
567 AC97_PCM_CFG_SPDIF = 20
568};
569
570struct ac97_pcm {
571 ac97_bus_t *bus;
572 unsigned int stream: 1, /* stream type: 1 = capture */
573 exclusive: 1, /* exclusive mode, don't override with other pcms */
574 copy_flag: 1, /* lowlevel driver must fill all entries */
575 spdif: 1; /* spdif pcm */
576 unsigned short aslots; /* active slots */
577 unsigned int rates; /* available rates */
578 struct {
579 unsigned short slots; /* driver input: requested AC97 slot numbers */
580 unsigned short rslots[4]; /* allocated slots per codecs */
581 unsigned char rate_table[4];
582 ac97_t *codec[4]; /* allocated codecs */
583 } r[2]; /* 0 = standard rates, 1 = double rates */
584 unsigned long private_value; /* used by the hardware driver */
585};
586
584int snd_ac97_pcm_assign(ac97_bus_t *ac97, 587int snd_ac97_pcm_assign(ac97_bus_t *ac97,
585 unsigned short pcms_count, 588 unsigned short pcms_count,
586 const struct ac97_pcm *pcms); 589 const struct ac97_pcm *pcms);
@@ -589,14 +592,6 @@ int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate,
589int snd_ac97_pcm_close(struct ac97_pcm *pcm); 592int snd_ac97_pcm_close(struct ac97_pcm *pcm);
590int snd_ac97_pcm_double_rate_rules(snd_pcm_runtime_t *runtime); 593int snd_ac97_pcm_double_rate_rules(snd_pcm_runtime_t *runtime);
591 594
592struct ac97_enum {
593 unsigned char reg;
594 unsigned char shift_l;
595 unsigned char shift_r;
596 unsigned short mask;
597 const char **texts;
598};
599
600/* ad hoc AC97 device driver access */ 595/* ad hoc AC97 device driver access */
601extern struct bus_type ac97_bus_type; 596extern struct bus_type ac97_bus_type;
602 597