diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-02-22 06:58:27 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-05-11 10:55:42 -0400 |
commit | ac519028a4e7b919eaff65a1535824259df326c6 (patch) | |
tree | 7714442b381e888370079732adb2bce38e32fcf0 /sound/pci/ac97/ac97_patch.h | |
parent | ef991b95aa1351a5782cfaccb9aefba76ca8b990 (diff) |
[ALSA] ac97 - Make patch functions static
Include ac97_patch.c from the main ac97_codec.c in order to make
bunch of patch_*() functions static. This helps optimization.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ac97/ac97_patch.h')
-rw-r--r-- | sound/pci/ac97/ac97_patch.h | 110 |
1 files changed, 69 insertions, 41 deletions
diff --git a/sound/pci/ac97/ac97_patch.h b/sound/pci/ac97/ac97_patch.h index 555d1c9a98fd..fd341ce63762 100644 --- a/sound/pci/ac97/ac97_patch.h +++ b/sound/pci/ac97/ac97_patch.h | |||
@@ -22,44 +22,72 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | int patch_yamaha_ymf753(struct snd_ac97 * ac97); | 25 | #define AC97_SINGLE_VALUE(reg,shift,mask,invert) \ |
26 | int patch_wolfson00(struct snd_ac97 * ac97); | 26 | ((reg) | ((shift) << 8) | ((shift) << 12) | ((mask) << 16) | \ |
27 | int patch_wolfson03(struct snd_ac97 * ac97); | 27 | ((invert) << 24)) |
28 | int patch_wolfson04(struct snd_ac97 * ac97); | 28 | #define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) \ |
29 | int patch_wolfson05(struct snd_ac97 * ac97); | 29 | (AC97_SINGLE_VALUE(reg,shift,mask,invert) | (1<<25) | ((page) << 26)) |
30 | int patch_wolfson11(struct snd_ac97 * ac97); | 30 | #define AC97_SINGLE(xname, reg, shift, mask, invert) \ |
31 | int patch_wolfson13(struct snd_ac97 * ac97); | 31 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
32 | int patch_tritech_tr28028(struct snd_ac97 * ac97); | 32 | .info = snd_ac97_info_volsw, \ |
33 | int patch_sigmatel_stac9700(struct snd_ac97 * ac97); | 33 | .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \ |
34 | int patch_sigmatel_stac9708(struct snd_ac97 * ac97); | 34 | .private_value = AC97_SINGLE_VALUE(reg, shift, mask, invert) } |
35 | int patch_sigmatel_stac9721(struct snd_ac97 * ac97); | 35 | #define AC97_PAGE_SINGLE(xname, reg, shift, mask, invert, page) \ |
36 | int patch_sigmatel_stac9744(struct snd_ac97 * ac97); | 36 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
37 | int patch_sigmatel_stac9756(struct snd_ac97 * ac97); | 37 | .info = snd_ac97_info_volsw, \ |
38 | int patch_sigmatel_stac9758(struct snd_ac97 * ac97); | 38 | .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \ |
39 | int patch_cirrus_cs4299(struct snd_ac97 * ac97); | 39 | .private_value = AC97_PAGE_SINGLE_VALUE(reg, shift, mask, invert, page) } |
40 | int patch_cirrus_spdif(struct snd_ac97 * ac97); | 40 | #define AC97_DOUBLE(xname, reg, shift_left, shift_right, mask, invert) \ |
41 | int patch_conexant(struct snd_ac97 * ac97); | 41 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ |
42 | int patch_cx20551(struct snd_ac97 * ac97); | 42 | .info = snd_ac97_info_volsw, \ |
43 | int patch_ad1819(struct snd_ac97 * ac97); | 43 | .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \ |
44 | int patch_ad1881(struct snd_ac97 * ac97); | 44 | .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) } |
45 | int patch_ad1885(struct snd_ac97 * ac97); | 45 | |
46 | int patch_ad1886(struct snd_ac97 * ac97); | 46 | /* enum control */ |
47 | int patch_ad1888(struct snd_ac97 * ac97); | 47 | struct ac97_enum { |
48 | int patch_ad1980(struct snd_ac97 * ac97); | 48 | unsigned char reg; |
49 | int patch_ad1981a(struct snd_ac97 * ac97); | 49 | unsigned char shift_l; |
50 | int patch_ad1981b(struct snd_ac97 * ac97); | 50 | unsigned char shift_r; |
51 | int patch_ad1985(struct snd_ac97 * ac97); | 51 | unsigned short mask; |
52 | int patch_ad1986(struct snd_ac97 * ac97); | 52 | const char **texts; |
53 | int patch_alc650(struct snd_ac97 * ac97); | 53 | }; |
54 | int patch_alc655(struct snd_ac97 * ac97); | 54 | |
55 | int patch_alc850(struct snd_ac97 * ac97); | 55 | #define AC97_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \ |
56 | int patch_cm9738(struct snd_ac97 * ac97); | 56 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ |
57 | int patch_cm9739(struct snd_ac97 * ac97); | 57 | .mask = xmask, .texts = xtexts } |
58 | int patch_cm9761(struct snd_ac97 * ac97); | 58 | #define AC97_ENUM_SINGLE(xreg, xshift, xmask, xtexts) \ |
59 | int patch_cm9780(struct snd_ac97 * ac97); | 59 | AC97_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xtexts) |
60 | int patch_vt1616(struct snd_ac97 * ac97); | 60 | #define AC97_ENUM(xname, xenum) \ |
61 | int patch_vt1617a(struct snd_ac97 * ac97); | 61 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
62 | int patch_it2646(struct snd_ac97 * ac97); | 62 | .info = snd_ac97_info_enum_double, \ |
63 | int patch_ucb1400(struct snd_ac97 * ac97); | 63 | .get = snd_ac97_get_enum_double, .put = snd_ac97_put_enum_double, \ |
64 | int mpatch_si3036(struct snd_ac97 * ac97); | 64 | .private_value = (unsigned long)&xenum } |
65 | int patch_lm4550(struct snd_ac97 * ac97); | 65 | |
66 | /* ac97_codec.c */ | ||
67 | static const struct snd_kcontrol_new snd_ac97_controls_3d[]; | ||
68 | static const struct snd_kcontrol_new snd_ac97_controls_spdif[]; | ||
69 | static struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, | ||
70 | struct snd_ac97 * ac97); | ||
71 | static int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol, | ||
72 | struct snd_ctl_elem_info *uinfo); | ||
73 | static int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol, | ||
74 | struct snd_ctl_elem_value *ucontrol); | ||
75 | static int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, | ||
76 | struct snd_ctl_elem_value *ucontrol); | ||
77 | static int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit); | ||
78 | static int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, | ||
79 | const char *suffix); | ||
80 | static int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, | ||
81 | const char *dst, const char *suffix); | ||
82 | static int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, | ||
83 | const char *s2, const char *suffix); | ||
84 | static void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, | ||
85 | const char *dst); | ||
86 | static void snd_ac97_restore_status(struct snd_ac97 *ac97); | ||
87 | static void snd_ac97_restore_iec958(struct snd_ac97 *ac97); | ||
88 | static int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol, | ||
89 | struct snd_ctl_elem_info *uinfo); | ||
90 | static int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol, | ||
91 | struct snd_ctl_elem_value *ucontrol); | ||
92 | static int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol, | ||
93 | struct snd_ctl_elem_value *ucontrol); | ||