aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-12-01 04:49:58 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:30:08 -0500
commitadf1b3d25e50dbab48fdd21006bea2dd5a4cb3a8 (patch)
treee520ddca1f0cd5e9bb9afd14f3f226e2b1596e9a /sound/pci/ac97
parent8cb7b63f5baf7b5e788f0d632d5ebd018856416f (diff)
[ALSA] Optimize for config without PROC_FS (pci drivers)
Optimize the code when compiled without CONFIG_PROC_FS for some pci drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r--sound/pci/ac97/ac97_codec.c38
-rw-r--r--sound/pci/ac97/ac97_local.h1
-rw-r--r--sound/pci/ac97/ac97_proc.c36
-rw-r--r--sound/pci/ac97/ak4531_codec.c8
4 files changed, 45 insertions, 38 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index abc83fa85bcd..17c3ddac35cc 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -184,42 +184,6 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
184{ 0, 0, NULL, NULL, NULL } 184{ 0, 0, NULL, NULL, NULL }
185}; 185};
186 186
187const char *snd_ac97_stereo_enhancements[] =
188{
189 /* 0 */ "No 3D Stereo Enhancement",
190 /* 1 */ "Analog Devices Phat Stereo",
191 /* 2 */ "Creative Stereo Enhancement",
192 /* 3 */ "National Semi 3D Stereo Enhancement",
193 /* 4 */ "YAMAHA Ymersion",
194 /* 5 */ "BBE 3D Stereo Enhancement",
195 /* 6 */ "Crystal Semi 3D Stereo Enhancement",
196 /* 7 */ "Qsound QXpander",
197 /* 8 */ "Spatializer 3D Stereo Enhancement",
198 /* 9 */ "SRS 3D Stereo Enhancement",
199 /* 10 */ "Platform Tech 3D Stereo Enhancement",
200 /* 11 */ "AKM 3D Audio",
201 /* 12 */ "Aureal Stereo Enhancement",
202 /* 13 */ "Aztech 3D Enhancement",
203 /* 14 */ "Binaura 3D Audio Enhancement",
204 /* 15 */ "ESS Technology Stereo Enhancement",
205 /* 16 */ "Harman International VMAx",
206 /* 17 */ "Nvidea/IC Ensemble/KS Waves 3D Stereo Enhancement",
207 /* 18 */ "Philips Incredible Sound",
208 /* 19 */ "Texas Instruments 3D Stereo Enhancement",
209 /* 20 */ "VLSI Technology 3D Stereo Enhancement",
210 /* 21 */ "TriTech 3D Stereo Enhancement",
211 /* 22 */ "Realtek 3D Stereo Enhancement",
212 /* 23 */ "Samsung 3D Stereo Enhancement",
213 /* 24 */ "Wolfson Microelectronics 3D Enhancement",
214 /* 25 */ "Delta Integration 3D Enhancement",
215 /* 26 */ "SigmaTel 3D Enhancement",
216 /* 27 */ "IC Ensemble/KS Waves",
217 /* 28 */ "Rockwell 3D Stereo Enhancement",
218 /* 29 */ "Reserved 29",
219 /* 30 */ "Reserved 30",
220 /* 31 */ "Reserved 31"
221};
222
223 187
224/* 188/*
225 * I/O routines 189 * I/O routines
@@ -1895,10 +1859,12 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template,
1895 init_MUTEX(&ac97->reg_mutex); 1859 init_MUTEX(&ac97->reg_mutex);
1896 init_MUTEX(&ac97->page_mutex); 1860 init_MUTEX(&ac97->page_mutex);
1897 1861
1862#ifdef CONFIG_PCI
1898 if (ac97->pci) { 1863 if (ac97->pci) {
1899 pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_VENDOR_ID, &ac97->subsystem_vendor); 1864 pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_VENDOR_ID, &ac97->subsystem_vendor);
1900 pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_ID, &ac97->subsystem_device); 1865 pci_read_config_word(ac97->pci, PCI_SUBSYSTEM_ID, &ac97->subsystem_device);
1901 } 1866 }
1867#endif
1902 if (bus->ops->reset) { 1868 if (bus->ops->reset) {
1903 bus->ops->reset(ac97); 1869 bus->ops->reset(ac97);
1904 goto __access_ok; 1870 goto __access_ok;
diff --git a/sound/pci/ac97/ac97_local.h b/sound/pci/ac97/ac97_local.h
index e98587e027d4..a6244c720a1d 100644
--- a/sound/pci/ac97/ac97_local.h
+++ b/sound/pci/ac97/ac97_local.h
@@ -57,7 +57,6 @@ struct ac97_enum {
57 .private_value = (unsigned long)&xenum } 57 .private_value = (unsigned long)&xenum }
58 58
59/* ac97_codec.c */ 59/* ac97_codec.c */
60extern const char *snd_ac97_stereo_enhancements[];
61extern const struct snd_kcontrol_new snd_ac97_controls_3d[]; 60extern const struct snd_kcontrol_new snd_ac97_controls_3d[];
62extern const struct snd_kcontrol_new snd_ac97_controls_spdif[]; 61extern const struct snd_kcontrol_new snd_ac97_controls_spdif[];
63struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, struct snd_ac97 * ac97); 62struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, struct snd_ac97 * ac97);
diff --git a/sound/pci/ac97/ac97_proc.c b/sound/pci/ac97/ac97_proc.c
index 266073201293..7134b3f55fb5 100644
--- a/sound/pci/ac97/ac97_proc.c
+++ b/sound/pci/ac97/ac97_proc.c
@@ -68,6 +68,42 @@ static void snd_ac97_proc_read_functions(struct snd_ac97 *ac97, struct snd_info_
68 } 68 }
69} 69}
70 70
71static const char *snd_ac97_stereo_enhancements[] =
72{
73 /* 0 */ "No 3D Stereo Enhancement",
74 /* 1 */ "Analog Devices Phat Stereo",
75 /* 2 */ "Creative Stereo Enhancement",
76 /* 3 */ "National Semi 3D Stereo Enhancement",
77 /* 4 */ "YAMAHA Ymersion",
78 /* 5 */ "BBE 3D Stereo Enhancement",
79 /* 6 */ "Crystal Semi 3D Stereo Enhancement",
80 /* 7 */ "Qsound QXpander",
81 /* 8 */ "Spatializer 3D Stereo Enhancement",
82 /* 9 */ "SRS 3D Stereo Enhancement",
83 /* 10 */ "Platform Tech 3D Stereo Enhancement",
84 /* 11 */ "AKM 3D Audio",
85 /* 12 */ "Aureal Stereo Enhancement",
86 /* 13 */ "Aztech 3D Enhancement",
87 /* 14 */ "Binaura 3D Audio Enhancement",
88 /* 15 */ "ESS Technology Stereo Enhancement",
89 /* 16 */ "Harman International VMAx",
90 /* 17 */ "Nvidea/IC Ensemble/KS Waves 3D Stereo Enhancement",
91 /* 18 */ "Philips Incredible Sound",
92 /* 19 */ "Texas Instruments 3D Stereo Enhancement",
93 /* 20 */ "VLSI Technology 3D Stereo Enhancement",
94 /* 21 */ "TriTech 3D Stereo Enhancement",
95 /* 22 */ "Realtek 3D Stereo Enhancement",
96 /* 23 */ "Samsung 3D Stereo Enhancement",
97 /* 24 */ "Wolfson Microelectronics 3D Enhancement",
98 /* 25 */ "Delta Integration 3D Enhancement",
99 /* 26 */ "SigmaTel 3D Enhancement",
100 /* 27 */ "IC Ensemble/KS Waves",
101 /* 28 */ "Rockwell 3D Stereo Enhancement",
102 /* 29 */ "Reserved 29",
103 /* 30 */ "Reserved 30",
104 /* 31 */ "Reserved 31"
105};
106
71static void snd_ac97_proc_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx) 107static void snd_ac97_proc_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx)
72{ 108{
73 char name[64]; 109 char name[64];
diff --git a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c
index 3eb885584e9a..dcfb5036ff8b 100644
--- a/sound/pci/ac97/ak4531_codec.c
+++ b/sound/pci/ac97/ak4531_codec.c
@@ -30,7 +30,11 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
30MODULE_DESCRIPTION("Universal routines for AK4531 codec"); 30MODULE_DESCRIPTION("Universal routines for AK4531 codec");
31MODULE_LICENSE("GPL"); 31MODULE_LICENSE("GPL");
32 32
33#ifdef CONFIG_PROC_FS
33static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531); 34static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531);
35#else
36#define snd_ak4531_proc_init(card,ak)
37#endif
34 38
35/* 39/*
36 * 40 *
@@ -425,8 +429,9 @@ void snd_ak4531_resume(struct snd_ak4531 *ak4531)
425} 429}
426#endif 430#endif
427 431
432#ifdef CONFIG_PROC_FS
428/* 433/*
429 434 * /proc interface
430 */ 435 */
431 436
432static void snd_ak4531_proc_read(struct snd_info_entry *entry, 437static void snd_ak4531_proc_read(struct snd_info_entry *entry,
@@ -448,6 +453,7 @@ static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak453
448 if (! snd_card_proc_new(card, "ak4531", &entry)) 453 if (! snd_card_proc_new(card, "ak4531", &entry))
449 snd_info_set_text_ops(entry, ak4531, 1024, snd_ak4531_proc_read); 454 snd_info_set_text_ops(entry, ak4531, 1024, snd_ak4531_proc_read);
450} 455}
456#endif
451 457
452EXPORT_SYMBOL(snd_ak4531_mixer); 458EXPORT_SYMBOL(snd_ak4531_mixer);
453#ifdef CONFIG_PM 459#ifdef CONFIG_PM