aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-02-22 06:58:27 -0500
committerJaroslav Kysela <perex@suse.cz>2007-05-11 10:55:42 -0400
commitac519028a4e7b919eaff65a1535824259df326c6 (patch)
tree7714442b381e888370079732adb2bce38e32fcf0 /sound/pci/ac97
parentef991b95aa1351a5782cfaccb9aefba76ca8b990 (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')
-rw-r--r--sound/pci/ac97/Makefile2
-rw-r--r--sound/pci/ac97/ac97_codec.c43
-rw-r--r--sound/pci/ac97/ac97_local.h55
-rw-r--r--sound/pci/ac97/ac97_patch.c94
-rw-r--r--sound/pci/ac97/ac97_patch.h110
-rw-r--r--sound/pci/ac97/ac97_pcm.c1
6 files changed, 140 insertions, 165 deletions
diff --git a/sound/pci/ac97/Makefile b/sound/pci/ac97/Makefile
index 3c3222122d8b..f5d471896b95 100644
--- a/sound/pci/ac97/Makefile
+++ b/sound/pci/ac97/Makefile
@@ -3,7 +3,7 @@
3# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz> 3# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
4# 4#
5 5
6snd-ac97-codec-objs := ac97_codec.o ac97_pcm.o ac97_patch.o 6snd-ac97-codec-objs := ac97_codec.o ac97_pcm.o
7 7
8ifneq ($(CONFIG_PROC_FS),) 8ifneq ($(CONFIG_PROC_FS),)
9snd-ac97-codec-objs += ac97_proc.o 9snd-ac97-codec-objs += ac97_proc.o
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 3bfb2102fc5d..bbed644bf9c5 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -35,9 +35,9 @@
35#include <sound/ac97_codec.h> 35#include <sound/ac97_codec.h>
36#include <sound/asoundef.h> 36#include <sound/asoundef.h>
37#include <sound/initval.h> 37#include <sound/initval.h>
38#include "ac97_local.h"
39#include "ac97_id.h" 38#include "ac97_id.h"
40#include "ac97_patch.h" 39
40#include "ac97_patch.c"
41 41
42MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); 42MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
43MODULE_DESCRIPTION("Universal interface for Audio Codec '97"); 43MODULE_DESCRIPTION("Universal interface for Audio Codec '97");
@@ -432,7 +432,8 @@ static int snd_ac97_ad18xx_update_pcm_bits(struct snd_ac97 *ac97, int codec, uns
432 * Controls 432 * Controls
433 */ 433 */
434 434
435int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 435static int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol,
436 struct snd_ctl_elem_info *uinfo)
436{ 437{
437 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value; 438 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value;
438 439
@@ -446,7 +447,8 @@ int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem
446 return 0; 447 return 0;
447} 448}
448 449
449int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 450static int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol,
451 struct snd_ctl_elem_value *ucontrol)
450{ 452{
451 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 453 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
452 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value; 454 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value;
@@ -462,7 +464,8 @@ int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
462 return 0; 464 return 0;
463} 465}
464 466
465int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 467static int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol,
468 struct snd_ctl_elem_value *ucontrol)
466{ 469{
467 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 470 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
468 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value; 471 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value;
@@ -508,7 +511,8 @@ static void snd_ac97_page_restore(struct snd_ac97 *ac97, int page_save)
508} 511}
509 512
510/* volume and switch controls */ 513/* volume and switch controls */
511int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 514static int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol,
515 struct snd_ctl_elem_info *uinfo)
512{ 516{
513 int mask = (kcontrol->private_value >> 16) & 0xff; 517 int mask = (kcontrol->private_value >> 16) & 0xff;
514 int shift = (kcontrol->private_value >> 8) & 0x0f; 518 int shift = (kcontrol->private_value >> 8) & 0x0f;
@@ -521,7 +525,8 @@ int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info
521 return 0; 525 return 0;
522} 526}
523 527
524int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 528static int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol,
529 struct snd_ctl_elem_value *ucontrol)
525{ 530{
526 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 531 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
527 int reg = kcontrol->private_value & 0xff; 532 int reg = kcontrol->private_value & 0xff;
@@ -544,7 +549,8 @@ int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value
544 return 0; 549 return 0;
545} 550}
546 551
547int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 552static int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol,
553 struct snd_ctl_elem_value *ucontrol)
548{ 554{
549 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 555 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
550 int reg = kcontrol->private_value & 0xff; 556 int reg = kcontrol->private_value & 0xff;
@@ -646,7 +652,7 @@ AC97_ENUM("Mic Select", std_enum[3]),
646AC97_SINGLE("ADC/DAC Loopback", AC97_GENERAL_PURPOSE, 7, 1, 0) 652AC97_SINGLE("ADC/DAC Loopback", AC97_GENERAL_PURPOSE, 7, 1, 0)
647}; 653};
648 654
649const struct snd_kcontrol_new snd_ac97_controls_3d[2] = { 655static const struct snd_kcontrol_new snd_ac97_controls_3d[2] = {
650AC97_SINGLE("3D Control - Center", AC97_3D_CONTROL, 8, 15, 0), 656AC97_SINGLE("3D Control - Center", AC97_3D_CONTROL, 8, 15, 0),
651AC97_SINGLE("3D Control - Depth", AC97_3D_CONTROL, 0, 15, 0) 657AC97_SINGLE("3D Control - Depth", AC97_3D_CONTROL, 0, 15, 0)
652}; 658};
@@ -817,7 +823,7 @@ static int snd_ac97_put_spsa(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
817 return change; 823 return change;
818} 824}
819 825
820const struct snd_kcontrol_new snd_ac97_controls_spdif[5] = { 826static const struct snd_kcontrol_new snd_ac97_controls_spdif[5] = {
821 { 827 {
822 .access = SNDRV_CTL_ELEM_ACCESS_READ, 828 .access = SNDRV_CTL_ELEM_ACCESS_READ,
823 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 829 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1097,7 +1103,7 @@ static void check_volume_resolution(struct snd_ac97 *ac97, int reg, unsigned cha
1097 } 1103 }
1098} 1104}
1099 1105
1100int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit) 1106static int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit)
1101{ 1107{
1102 unsigned short mask, val, orig, res; 1108 unsigned short mask, val, orig, res;
1103 1109
@@ -1137,7 +1143,8 @@ static inline int printable(unsigned int x)
1137 return x; 1143 return x;
1138} 1144}
1139 1145
1140struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, struct snd_ac97 * ac97) 1146static struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template,
1147 struct snd_ac97 * ac97)
1141{ 1148{
1142 struct snd_kcontrol_new template; 1149 struct snd_kcontrol_new template;
1143 memcpy(&template, _template, sizeof(template)); 1150 memcpy(&template, _template, sizeof(template));
@@ -2544,7 +2551,8 @@ static void set_ctl_name(char *dst, const char *src, const char *suffix)
2544} 2551}
2545 2552
2546/* remove the control with the given name and optional suffix */ 2553/* remove the control with the given name and optional suffix */
2547int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, const char *suffix) 2554static int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name,
2555 const char *suffix)
2548{ 2556{
2549 struct snd_ctl_elem_id id; 2557 struct snd_ctl_elem_id id;
2550 memset(&id, 0, sizeof(id)); 2558 memset(&id, 0, sizeof(id));
@@ -2563,7 +2571,8 @@ static struct snd_kcontrol *ctl_find(struct snd_ac97 *ac97, const char *name, co
2563} 2571}
2564 2572
2565/* rename the control with the given name and optional suffix */ 2573/* rename the control with the given name and optional suffix */
2566int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, const char *dst, const char *suffix) 2574static int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src,
2575 const char *dst, const char *suffix)
2567{ 2576{
2568 struct snd_kcontrol *kctl = ctl_find(ac97, src, suffix); 2577 struct snd_kcontrol *kctl = ctl_find(ac97, src, suffix);
2569 if (kctl) { 2578 if (kctl) {
@@ -2574,14 +2583,16 @@ int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, const char *dst,
2574} 2583}
2575 2584
2576/* rename both Volume and Switch controls - don't check the return value */ 2585/* rename both Volume and Switch controls - don't check the return value */
2577void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, const char *dst) 2586static void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src,
2587 const char *dst)
2578{ 2588{
2579 snd_ac97_rename_ctl(ac97, src, dst, "Switch"); 2589 snd_ac97_rename_ctl(ac97, src, dst, "Switch");
2580 snd_ac97_rename_ctl(ac97, src, dst, "Volume"); 2590 snd_ac97_rename_ctl(ac97, src, dst, "Volume");
2581} 2591}
2582 2592
2583/* swap controls */ 2593/* swap controls */
2584int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, const char *s2, const char *suffix) 2594static int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1,
2595 const char *s2, const char *suffix)
2585{ 2596{
2586 struct snd_kcontrol *kctl1, *kctl2; 2597 struct snd_kcontrol *kctl1, *kctl2;
2587 kctl1 = ctl_find(ac97, s1, suffix); 2598 kctl1 = ctl_find(ac97, s1, suffix);
diff --git a/sound/pci/ac97/ac97_local.h b/sound/pci/ac97/ac97_local.h
index a6244c720a1d..78745c5c6df8 100644
--- a/sound/pci/ac97/ac97_local.h
+++ b/sound/pci/ac97/ac97_local.h
@@ -22,59 +22,8 @@
22 * 22 *
23 */ 23 */
24 24
25#define AC97_SINGLE_VALUE(reg,shift,mask,invert) ((reg) | ((shift) << 8) | ((shift) << 12) | ((mask) << 16) | ((invert) << 24)) 25void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name,
26#define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) (AC97_SINGLE_VALUE(reg,shift,mask,invert) | (1<<25) | ((page) << 26)) 26 int modem);
27#define AC97_SINGLE(xname, reg, shift, mask, invert) \
28{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_volsw, \
29 .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
30 .private_value = AC97_SINGLE_VALUE(reg, shift, mask, invert) }
31#define AC97_PAGE_SINGLE(xname, reg, shift, mask, invert, page) \
32{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_volsw, \
33 .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
34 .private_value = AC97_PAGE_SINGLE_VALUE(reg, shift, mask, invert, page) }
35#define AC97_DOUBLE(xname, reg, shift_left, shift_right, mask, invert) \
36{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), .info = snd_ac97_info_volsw, \
37 .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
38 .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) }
39
40/* enum control */
41struct ac97_enum {
42 unsigned char reg;
43 unsigned char shift_l;
44 unsigned char shift_r;
45 unsigned short mask;
46 const char **texts;
47};
48
49#define AC97_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \
50{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
51 .mask = xmask, .texts = xtexts }
52#define AC97_ENUM_SINGLE(xreg, xshift, xmask, xtexts) \
53 AC97_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xtexts)
54#define AC97_ENUM(xname, xenum) \
55{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_enum_double, \
56 .get = snd_ac97_get_enum_double, .put = snd_ac97_put_enum_double, \
57 .private_value = (unsigned long)&xenum }
58
59/* ac97_codec.c */
60extern const struct snd_kcontrol_new snd_ac97_controls_3d[];
61extern const struct snd_kcontrol_new snd_ac97_controls_spdif[];
62struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, struct snd_ac97 * ac97);
63void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int modem);
64int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
65int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
66int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
67int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit);
68int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, const char *suffix);
69int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, const char *dst, const char *suffix);
70int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, const char *s2, const char *suffix);
71void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, const char *dst);
72void snd_ac97_restore_status(struct snd_ac97 *ac97);
73void snd_ac97_restore_iec958(struct snd_ac97 *ac97);
74int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
75int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
76int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
77
78int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg, 27int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg,
79 unsigned short mask, unsigned short value); 28 unsigned short mask, unsigned short value);
80 29
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index b188a4df58cb..30064c17494b 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -23,20 +23,8 @@
23 * 23 *
24 */ 24 */
25 25
26#include <sound/driver.h>
27#include <linux/delay.h>
28#include <linux/init.h>
29#include <linux/slab.h>
30#include <linux/mutex.h>
31
32#include <sound/core.h>
33#include <sound/pcm.h>
34#include <sound/control.h>
35#include <sound/tlv.h>
36#include <sound/ac97_codec.h>
37#include "ac97_patch.h"
38#include "ac97_id.h"
39#include "ac97_local.h" 26#include "ac97_local.h"
27#include "ac97_patch.h"
40 28
41/* 29/*
42 * Chip specific initialization 30 * Chip specific initialization
@@ -390,7 +378,7 @@ static struct snd_ac97_build_ops patch_yamaha_ymf753_ops = {
390 .build_post_spdif = patch_yamaha_ymf753_post_spdif 378 .build_post_spdif = patch_yamaha_ymf753_post_spdif
391}; 379};
392 380
393int patch_yamaha_ymf753(struct snd_ac97 * ac97) 381static int patch_yamaha_ymf753(struct snd_ac97 * ac97)
394{ 382{
395 /* Patch for Yamaha YMF753, Copyright (c) by David Shust, dshust@shustring.com. 383 /* Patch for Yamaha YMF753, Copyright (c) by David Shust, dshust@shustring.com.
396 This chip has nonstandard and extended behaviour with regard to its S/PDIF output. 384 This chip has nonstandard and extended behaviour with regard to its S/PDIF output.
@@ -436,7 +424,7 @@ static struct snd_ac97_build_ops patch_wolfson_wm9703_ops = {
436 .build_specific = patch_wolfson_wm9703_specific, 424 .build_specific = patch_wolfson_wm9703_specific,
437}; 425};
438 426
439int patch_wolfson03(struct snd_ac97 * ac97) 427static int patch_wolfson03(struct snd_ac97 * ac97)
440{ 428{
441 ac97->build_ops = &patch_wolfson_wm9703_ops; 429 ac97->build_ops = &patch_wolfson_wm9703_ops;
442 return 0; 430 return 0;
@@ -467,7 +455,7 @@ static struct snd_ac97_build_ops patch_wolfson_wm9704_ops = {
467 .build_specific = patch_wolfson_wm9704_specific, 455 .build_specific = patch_wolfson_wm9704_specific,
468}; 456};
469 457
470int patch_wolfson04(struct snd_ac97 * ac97) 458static int patch_wolfson04(struct snd_ac97 * ac97)
471{ 459{
472 /* WM9704M/9704Q */ 460 /* WM9704M/9704Q */
473 ac97->build_ops = &patch_wolfson_wm9704_ops; 461 ac97->build_ops = &patch_wolfson_wm9704_ops;
@@ -489,7 +477,7 @@ static struct snd_ac97_build_ops patch_wolfson_wm9705_ops = {
489 .build_specific = patch_wolfson_wm9705_specific, 477 .build_specific = patch_wolfson_wm9705_specific,
490}; 478};
491 479
492int patch_wolfson05(struct snd_ac97 * ac97) 480static int patch_wolfson05(struct snd_ac97 * ac97)
493{ 481{
494 /* WM9705, WM9710 */ 482 /* WM9705, WM9710 */
495 ac97->build_ops = &patch_wolfson_wm9705_ops; 483 ac97->build_ops = &patch_wolfson_wm9705_ops;
@@ -625,7 +613,7 @@ static struct snd_ac97_build_ops patch_wolfson_wm9711_ops = {
625 .build_specific = patch_wolfson_wm9711_specific, 613 .build_specific = patch_wolfson_wm9711_specific,
626}; 614};
627 615
628int patch_wolfson11(struct snd_ac97 * ac97) 616static int patch_wolfson11(struct snd_ac97 * ac97)
629{ 617{
630 /* WM9711, WM9712 */ 618 /* WM9711, WM9712 */
631 ac97->build_ops = &patch_wolfson_wm9711_ops; 619 ac97->build_ops = &patch_wolfson_wm9711_ops;
@@ -824,7 +812,7 @@ static struct snd_ac97_build_ops patch_wolfson_wm9713_ops = {
824#endif 812#endif
825}; 813};
826 814
827int patch_wolfson13(struct snd_ac97 * ac97) 815static int patch_wolfson13(struct snd_ac97 * ac97)
828{ 816{
829 /* WM9713, WM9714 */ 817 /* WM9713, WM9714 */
830 ac97->build_ops = &patch_wolfson_wm9713_ops; 818 ac97->build_ops = &patch_wolfson_wm9713_ops;
@@ -844,7 +832,7 @@ int patch_wolfson13(struct snd_ac97 * ac97)
844/* 832/*
845 * Tritech codec 833 * Tritech codec
846 */ 834 */
847int patch_tritech_tr28028(struct snd_ac97 * ac97) 835static int patch_tritech_tr28028(struct snd_ac97 * ac97)
848{ 836{
849 snd_ac97_write_cache(ac97, 0x26, 0x0300); 837 snd_ac97_write_cache(ac97, 0x26, 0x0300);
850 snd_ac97_write_cache(ac97, 0x26, 0x0000); 838 snd_ac97_write_cache(ac97, 0x26, 0x0000);
@@ -922,7 +910,7 @@ static struct snd_ac97_build_ops patch_sigmatel_stac9700_ops = {
922 .build_specific = patch_sigmatel_stac97xx_specific 910 .build_specific = patch_sigmatel_stac97xx_specific
923}; 911};
924 912
925int patch_sigmatel_stac9700(struct snd_ac97 * ac97) 913static int patch_sigmatel_stac9700(struct snd_ac97 * ac97)
926{ 914{
927 ac97->build_ops = &patch_sigmatel_stac9700_ops; 915 ac97->build_ops = &patch_sigmatel_stac9700_ops;
928 return 0; 916 return 0;
@@ -969,7 +957,7 @@ static struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = {
969 .build_specific = patch_sigmatel_stac9708_specific 957 .build_specific = patch_sigmatel_stac9708_specific
970}; 958};
971 959
972int patch_sigmatel_stac9708(struct snd_ac97 * ac97) 960static int patch_sigmatel_stac9708(struct snd_ac97 * ac97)
973{ 961{
974 unsigned int codec72, codec6c; 962 unsigned int codec72, codec6c;
975 963
@@ -995,7 +983,7 @@ int patch_sigmatel_stac9708(struct snd_ac97 * ac97)
995 return 0; 983 return 0;
996} 984}
997 985
998int patch_sigmatel_stac9721(struct snd_ac97 * ac97) 986static int patch_sigmatel_stac9721(struct snd_ac97 * ac97)
999{ 987{
1000 ac97->build_ops = &patch_sigmatel_stac9700_ops; 988 ac97->build_ops = &patch_sigmatel_stac9700_ops;
1001 if (snd_ac97_read(ac97, AC97_SIGMATEL_ANALOG) == 0) { 989 if (snd_ac97_read(ac97, AC97_SIGMATEL_ANALOG) == 0) {
@@ -1009,7 +997,7 @@ int patch_sigmatel_stac9721(struct snd_ac97 * ac97)
1009 return 0; 997 return 0;
1010} 998}
1011 999
1012int patch_sigmatel_stac9744(struct snd_ac97 * ac97) 1000static int patch_sigmatel_stac9744(struct snd_ac97 * ac97)
1013{ 1001{
1014 // patch for SigmaTel 1002 // patch for SigmaTel
1015 ac97->build_ops = &patch_sigmatel_stac9700_ops; 1003 ac97->build_ops = &patch_sigmatel_stac9700_ops;
@@ -1021,7 +1009,7 @@ int patch_sigmatel_stac9744(struct snd_ac97 * ac97)
1021 return 0; 1009 return 0;
1022} 1010}
1023 1011
1024int patch_sigmatel_stac9756(struct snd_ac97 * ac97) 1012static int patch_sigmatel_stac9756(struct snd_ac97 * ac97)
1025{ 1013{
1026 // patch for SigmaTel 1014 // patch for SigmaTel
1027 ac97->build_ops = &patch_sigmatel_stac9700_ops; 1015 ac97->build_ops = &patch_sigmatel_stac9700_ops;
@@ -1198,7 +1186,7 @@ static struct snd_ac97_build_ops patch_sigmatel_stac9758_ops = {
1198 .build_specific = patch_sigmatel_stac9758_specific 1186 .build_specific = patch_sigmatel_stac9758_specific
1199}; 1187};
1200 1188
1201int patch_sigmatel_stac9758(struct snd_ac97 * ac97) 1189static int patch_sigmatel_stac9758(struct snd_ac97 * ac97)
1202{ 1190{
1203 static unsigned short regs[4] = { 1191 static unsigned short regs[4] = {
1204 AC97_SIGMATEL_OUTSEL, 1192 AC97_SIGMATEL_OUTSEL,
@@ -1272,7 +1260,7 @@ static struct snd_ac97_build_ops patch_cirrus_ops = {
1272 .build_spdif = patch_cirrus_build_spdif 1260 .build_spdif = patch_cirrus_build_spdif
1273}; 1261};
1274 1262
1275int patch_cirrus_spdif(struct snd_ac97 * ac97) 1263static int patch_cirrus_spdif(struct snd_ac97 * ac97)
1276{ 1264{
1277 /* Basically, the cs4201/cs4205/cs4297a has non-standard sp/dif registers. 1265 /* Basically, the cs4201/cs4205/cs4297a has non-standard sp/dif registers.
1278 WHY CAN'T ANYONE FOLLOW THE BLOODY SPEC? *sigh* 1266 WHY CAN'T ANYONE FOLLOW THE BLOODY SPEC? *sigh*
@@ -1293,7 +1281,7 @@ int patch_cirrus_spdif(struct snd_ac97 * ac97)
1293 return 0; 1281 return 0;
1294} 1282}
1295 1283
1296int patch_cirrus_cs4299(struct snd_ac97 * ac97) 1284static int patch_cirrus_cs4299(struct snd_ac97 * ac97)
1297{ 1285{
1298 /* force the detection of PC Beep */ 1286 /* force the detection of PC Beep */
1299 ac97->flags |= AC97_HAS_PC_BEEP; 1287 ac97->flags |= AC97_HAS_PC_BEEP;
@@ -1329,7 +1317,7 @@ static struct snd_ac97_build_ops patch_conexant_ops = {
1329 .build_spdif = patch_conexant_build_spdif 1317 .build_spdif = patch_conexant_build_spdif
1330}; 1318};
1331 1319
1332int patch_conexant(struct snd_ac97 * ac97) 1320static int patch_conexant(struct snd_ac97 * ac97)
1333{ 1321{
1334 ac97->build_ops = &patch_conexant_ops; 1322 ac97->build_ops = &patch_conexant_ops;
1335 ac97->flags |= AC97_CX_SPDIF; 1323 ac97->flags |= AC97_CX_SPDIF;
@@ -1338,7 +1326,7 @@ int patch_conexant(struct snd_ac97 * ac97)
1338 return 0; 1326 return 0;
1339} 1327}
1340 1328
1341int patch_cx20551(struct snd_ac97 *ac97) 1329static int patch_cx20551(struct snd_ac97 *ac97)
1342{ 1330{
1343 snd_ac97_update_bits(ac97, 0x5c, 0x01, 0x01); 1331 snd_ac97_update_bits(ac97, 0x5c, 0x01, 0x01);
1344 return 0; 1332 return 0;
@@ -1430,7 +1418,7 @@ static const struct snd_ac97_res_table ad1819_restbl[] = {
1430 { } /* terminator */ 1418 { } /* terminator */
1431}; 1419};
1432 1420
1433int patch_ad1819(struct snd_ac97 * ac97) 1421static int patch_ad1819(struct snd_ac97 * ac97)
1434{ 1422{
1435 unsigned short scfg; 1423 unsigned short scfg;
1436 1424
@@ -1507,7 +1495,7 @@ static struct snd_ac97_build_ops patch_ad1881_build_ops = {
1507#endif 1495#endif
1508}; 1496};
1509 1497
1510int patch_ad1881(struct snd_ac97 * ac97) 1498static int patch_ad1881(struct snd_ac97 * ac97)
1511{ 1499{
1512 static const char cfg_idxs[3][2] = { 1500 static const char cfg_idxs[3][2] = {
1513 {2, 1}, 1501 {2, 1},
@@ -1595,7 +1583,7 @@ static struct snd_ac97_build_ops patch_ad1885_build_ops = {
1595#endif 1583#endif
1596}; 1584};
1597 1585
1598int patch_ad1885(struct snd_ac97 * ac97) 1586static int patch_ad1885(struct snd_ac97 * ac97)
1599{ 1587{
1600 patch_ad1881(ac97); 1588 patch_ad1881(ac97);
1601 /* This is required to deal with the Intel D815EEAL2 */ 1589 /* This is required to deal with the Intel D815EEAL2 */
@@ -1622,7 +1610,7 @@ static struct snd_ac97_build_ops patch_ad1886_build_ops = {
1622#endif 1610#endif
1623}; 1611};
1624 1612
1625int patch_ad1886(struct snd_ac97 * ac97) 1613static int patch_ad1886(struct snd_ac97 * ac97)
1626{ 1614{
1627 patch_ad1881(ac97); 1615 patch_ad1881(ac97);
1628 /* Presario700 workaround */ 1616 /* Presario700 workaround */
@@ -1844,7 +1832,7 @@ static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97)
1844 snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11); 1832 snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11);
1845} 1833}
1846 1834
1847int patch_ad1981a(struct snd_ac97 *ac97) 1835static int patch_ad1981a(struct snd_ac97 *ac97)
1848{ 1836{
1849 patch_ad1881(ac97); 1837 patch_ad1881(ac97);
1850 ac97->build_ops = &patch_ad1981a_build_ops; 1838 ac97->build_ops = &patch_ad1981a_build_ops;
@@ -1877,7 +1865,7 @@ static struct snd_ac97_build_ops patch_ad1981b_build_ops = {
1877#endif 1865#endif
1878}; 1866};
1879 1867
1880int patch_ad1981b(struct snd_ac97 *ac97) 1868static int patch_ad1981b(struct snd_ac97 *ac97)
1881{ 1869{
1882 patch_ad1881(ac97); 1870 patch_ad1881(ac97);
1883 ac97->build_ops = &patch_ad1981b_build_ops; 1871 ac97->build_ops = &patch_ad1981b_build_ops;
@@ -2014,7 +2002,7 @@ static struct snd_ac97_build_ops patch_ad1888_build_ops = {
2014 .update_jacks = ad1888_update_jacks, 2002 .update_jacks = ad1888_update_jacks,
2015}; 2003};
2016 2004
2017int patch_ad1888(struct snd_ac97 * ac97) 2005static int patch_ad1888(struct snd_ac97 * ac97)
2018{ 2006{
2019 unsigned short misc; 2007 unsigned short misc;
2020 2008
@@ -2052,7 +2040,7 @@ static struct snd_ac97_build_ops patch_ad1980_build_ops = {
2052 .update_jacks = ad1888_update_jacks, 2040 .update_jacks = ad1888_update_jacks,
2053}; 2041};
2054 2042
2055int patch_ad1980(struct snd_ac97 * ac97) 2043static int patch_ad1980(struct snd_ac97 * ac97)
2056{ 2044{
2057 patch_ad1888(ac97); 2045 patch_ad1888(ac97);
2058 ac97->build_ops = &patch_ad1980_build_ops; 2046 ac97->build_ops = &patch_ad1980_build_ops;
@@ -2168,7 +2156,7 @@ static struct snd_ac97_build_ops patch_ad1985_build_ops = {
2168 .update_jacks = ad1985_update_jacks, 2156 .update_jacks = ad1985_update_jacks,
2169}; 2157};
2170 2158
2171int patch_ad1985(struct snd_ac97 * ac97) 2159static int patch_ad1985(struct snd_ac97 * ac97)
2172{ 2160{
2173 unsigned short misc; 2161 unsigned short misc;
2174 2162
@@ -2468,7 +2456,7 @@ static struct snd_ac97_build_ops patch_ad1986_build_ops = {
2468 .update_jacks = ad1986_update_jacks, 2456 .update_jacks = ad1986_update_jacks,
2469}; 2457};
2470 2458
2471int patch_ad1986(struct snd_ac97 * ac97) 2459static int patch_ad1986(struct snd_ac97 * ac97)
2472{ 2460{
2473 patch_ad1881(ac97); 2461 patch_ad1881(ac97);
2474 ac97->build_ops = &patch_ad1986_build_ops; 2462 ac97->build_ops = &patch_ad1986_build_ops;
@@ -2561,7 +2549,7 @@ static struct snd_ac97_build_ops patch_alc650_ops = {
2561 .update_jacks = alc650_update_jacks 2549 .update_jacks = alc650_update_jacks
2562}; 2550};
2563 2551
2564int patch_alc650(struct snd_ac97 * ac97) 2552static int patch_alc650(struct snd_ac97 * ac97)
2565{ 2553{
2566 unsigned short val; 2554 unsigned short val;
2567 2555
@@ -2713,7 +2701,7 @@ static struct snd_ac97_build_ops patch_alc655_ops = {
2713 .update_jacks = alc655_update_jacks 2701 .update_jacks = alc655_update_jacks
2714}; 2702};
2715 2703
2716int patch_alc655(struct snd_ac97 * ac97) 2704static int patch_alc655(struct snd_ac97 * ac97)
2717{ 2705{
2718 unsigned int val; 2706 unsigned int val;
2719 2707
@@ -2815,7 +2803,7 @@ static struct snd_ac97_build_ops patch_alc850_ops = {
2815 .update_jacks = alc850_update_jacks 2803 .update_jacks = alc850_update_jacks
2816}; 2804};
2817 2805
2818int patch_alc850(struct snd_ac97 *ac97) 2806static int patch_alc850(struct snd_ac97 *ac97)
2819{ 2807{
2820 ac97->build_ops = &patch_alc850_ops; 2808 ac97->build_ops = &patch_alc850_ops;
2821 2809
@@ -2875,7 +2863,7 @@ static struct snd_ac97_build_ops patch_cm9738_ops = {
2875 .update_jacks = cm9738_update_jacks 2863 .update_jacks = cm9738_update_jacks
2876}; 2864};
2877 2865
2878int patch_cm9738(struct snd_ac97 * ac97) 2866static int patch_cm9738(struct snd_ac97 * ac97)
2879{ 2867{
2880 ac97->build_ops = &patch_cm9738_ops; 2868 ac97->build_ops = &patch_cm9738_ops;
2881 /* FIXME: can anyone confirm below? */ 2869 /* FIXME: can anyone confirm below? */
@@ -2967,7 +2955,7 @@ static struct snd_ac97_build_ops patch_cm9739_ops = {
2967 .update_jacks = cm9739_update_jacks 2955 .update_jacks = cm9739_update_jacks
2968}; 2956};
2969 2957
2970int patch_cm9739(struct snd_ac97 * ac97) 2958static int patch_cm9739(struct snd_ac97 * ac97)
2971{ 2959{
2972 unsigned short val; 2960 unsigned short val;
2973 2961
@@ -3141,7 +3129,7 @@ static struct snd_ac97_build_ops patch_cm9761_ops = {
3141 .update_jacks = cm9761_update_jacks 3129 .update_jacks = cm9761_update_jacks
3142}; 3130};
3143 3131
3144int patch_cm9761(struct snd_ac97 *ac97) 3132static int patch_cm9761(struct snd_ac97 *ac97)
3145{ 3133{
3146 unsigned short val; 3134 unsigned short val;
3147 3135
@@ -3236,7 +3224,7 @@ static struct snd_ac97_build_ops patch_cm9780_ops = {
3236 .build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */ 3224 .build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */
3237}; 3225};
3238 3226
3239int patch_cm9780(struct snd_ac97 *ac97) 3227static int patch_cm9780(struct snd_ac97 *ac97)
3240{ 3228{
3241 unsigned short val; 3229 unsigned short val;
3242 3230
@@ -3279,7 +3267,7 @@ static struct snd_ac97_build_ops patch_vt1616_ops = {
3279 .build_specific = patch_vt1616_specific 3267 .build_specific = patch_vt1616_specific
3280}; 3268};
3281 3269
3282int patch_vt1616(struct snd_ac97 * ac97) 3270static int patch_vt1616(struct snd_ac97 * ac97)
3283{ 3271{
3284 ac97->build_ops = &patch_vt1616_ops; 3272 ac97->build_ops = &patch_vt1616_ops;
3285 return 0; 3273 return 0;
@@ -3288,7 +3276,7 @@ int patch_vt1616(struct snd_ac97 * ac97)
3288/* 3276/*
3289 * VT1617A codec 3277 * VT1617A codec
3290 */ 3278 */
3291int patch_vt1617a(struct snd_ac97 * ac97) 3279static int patch_vt1617a(struct snd_ac97 * ac97)
3292{ 3280{
3293 /* bring analog power consumption to normal, like WinXP driver 3281 /* bring analog power consumption to normal, like WinXP driver
3294 * for EPIA SP 3282 * for EPIA SP
@@ -3338,7 +3326,7 @@ static struct snd_ac97_build_ops patch_it2646_ops = {
3338 .update_jacks = it2646_update_jacks 3326 .update_jacks = it2646_update_jacks
3339}; 3327};
3340 3328
3341int patch_it2646(struct snd_ac97 * ac97) 3329static int patch_it2646(struct snd_ac97 * ac97)
3342{ 3330{
3343 ac97->build_ops = &patch_it2646_ops; 3331 ac97->build_ops = &patch_it2646_ops;
3344 /* full DAC volume */ 3332 /* full DAC volume */
@@ -3371,7 +3359,7 @@ static struct snd_ac97_build_ops patch_si3036_ops = {
3371 .build_specific = patch_si3036_specific, 3359 .build_specific = patch_si3036_specific,
3372}; 3360};
3373 3361
3374int mpatch_si3036(struct snd_ac97 * ac97) 3362static int mpatch_si3036(struct snd_ac97 * ac97)
3375{ 3363{
3376 ac97->build_ops = &patch_si3036_ops; 3364 ac97->build_ops = &patch_si3036_ops;
3377 snd_ac97_write_cache(ac97, 0x5c, 0xf210 ); 3365 snd_ac97_write_cache(ac97, 0x5c, 0xf210 );
@@ -3403,7 +3391,7 @@ static struct snd_ac97_res_table lm4550_restbl[] = {
3403 { } /* terminator */ 3391 { } /* terminator */
3404}; 3392};
3405 3393
3406int patch_lm4550(struct snd_ac97 *ac97) 3394static int patch_lm4550(struct snd_ac97 *ac97)
3407{ 3395{
3408 ac97->res_table = lm4550_restbl; 3396 ac97->res_table = lm4550_restbl;
3409 return 0; 3397 return 0;
@@ -3438,7 +3426,7 @@ static struct snd_ac97_build_ops patch_ucb1400_ops = {
3438 .build_specific = patch_ucb1400_specific, 3426 .build_specific = patch_ucb1400_specific,
3439}; 3427};
3440 3428
3441int patch_ucb1400(struct snd_ac97 * ac97) 3429static int patch_ucb1400(struct snd_ac97 * ac97)
3442{ 3430{
3443 ac97->build_ops = &patch_ucb1400_ops; 3431 ac97->build_ops = &patch_ucb1400_ops;
3444 /* enable headphone driver and smart low power mode by default */ 3432 /* enable headphone driver and smart low power mode by default */
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
25int patch_yamaha_ymf753(struct snd_ac97 * ac97); 25#define AC97_SINGLE_VALUE(reg,shift,mask,invert) \
26int patch_wolfson00(struct snd_ac97 * ac97); 26 ((reg) | ((shift) << 8) | ((shift) << 12) | ((mask) << 16) | \
27int patch_wolfson03(struct snd_ac97 * ac97); 27 ((invert) << 24))
28int patch_wolfson04(struct snd_ac97 * ac97); 28#define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) \
29int patch_wolfson05(struct snd_ac97 * ac97); 29 (AC97_SINGLE_VALUE(reg,shift,mask,invert) | (1<<25) | ((page) << 26))
30int patch_wolfson11(struct snd_ac97 * ac97); 30#define AC97_SINGLE(xname, reg, shift, mask, invert) \
31int patch_wolfson13(struct snd_ac97 * ac97); 31{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
32int patch_tritech_tr28028(struct snd_ac97 * ac97); 32 .info = snd_ac97_info_volsw, \
33int patch_sigmatel_stac9700(struct snd_ac97 * ac97); 33 .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
34int patch_sigmatel_stac9708(struct snd_ac97 * ac97); 34 .private_value = AC97_SINGLE_VALUE(reg, shift, mask, invert) }
35int patch_sigmatel_stac9721(struct snd_ac97 * ac97); 35#define AC97_PAGE_SINGLE(xname, reg, shift, mask, invert, page) \
36int patch_sigmatel_stac9744(struct snd_ac97 * ac97); 36{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
37int patch_sigmatel_stac9756(struct snd_ac97 * ac97); 37 .info = snd_ac97_info_volsw, \
38int patch_sigmatel_stac9758(struct snd_ac97 * ac97); 38 .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
39int patch_cirrus_cs4299(struct snd_ac97 * ac97); 39 .private_value = AC97_PAGE_SINGLE_VALUE(reg, shift, mask, invert, page) }
40int patch_cirrus_spdif(struct snd_ac97 * ac97); 40#define AC97_DOUBLE(xname, reg, shift_left, shift_right, mask, invert) \
41int patch_conexant(struct snd_ac97 * ac97); 41{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
42int patch_cx20551(struct snd_ac97 * ac97); 42 .info = snd_ac97_info_volsw, \
43int patch_ad1819(struct snd_ac97 * ac97); 43 .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
44int patch_ad1881(struct snd_ac97 * ac97); 44 .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) }
45int patch_ad1885(struct snd_ac97 * ac97); 45
46int patch_ad1886(struct snd_ac97 * ac97); 46/* enum control */
47int patch_ad1888(struct snd_ac97 * ac97); 47struct ac97_enum {
48int patch_ad1980(struct snd_ac97 * ac97); 48 unsigned char reg;
49int patch_ad1981a(struct snd_ac97 * ac97); 49 unsigned char shift_l;
50int patch_ad1981b(struct snd_ac97 * ac97); 50 unsigned char shift_r;
51int patch_ad1985(struct snd_ac97 * ac97); 51 unsigned short mask;
52int patch_ad1986(struct snd_ac97 * ac97); 52 const char **texts;
53int patch_alc650(struct snd_ac97 * ac97); 53};
54int patch_alc655(struct snd_ac97 * ac97); 54
55int patch_alc850(struct snd_ac97 * ac97); 55#define AC97_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \
56int patch_cm9738(struct snd_ac97 * ac97); 56{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
57int patch_cm9739(struct snd_ac97 * ac97); 57 .mask = xmask, .texts = xtexts }
58int patch_cm9761(struct snd_ac97 * ac97); 58#define AC97_ENUM_SINGLE(xreg, xshift, xmask, xtexts) \
59int patch_cm9780(struct snd_ac97 * ac97); 59 AC97_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xtexts)
60int patch_vt1616(struct snd_ac97 * ac97); 60#define AC97_ENUM(xname, xenum) \
61int patch_vt1617a(struct snd_ac97 * ac97); 61{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
62int patch_it2646(struct snd_ac97 * ac97); 62 .info = snd_ac97_info_enum_double, \
63int patch_ucb1400(struct snd_ac97 * ac97); 63 .get = snd_ac97_get_enum_double, .put = snd_ac97_put_enum_double, \
64int mpatch_si3036(struct snd_ac97 * ac97); 64 .private_value = (unsigned long)&xenum }
65int patch_lm4550(struct snd_ac97 * ac97); 65
66/* ac97_codec.c */
67static const struct snd_kcontrol_new snd_ac97_controls_3d[];
68static const struct snd_kcontrol_new snd_ac97_controls_spdif[];
69static struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template,
70 struct snd_ac97 * ac97);
71static int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol,
72 struct snd_ctl_elem_info *uinfo);
73static int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol,
74 struct snd_ctl_elem_value *ucontrol);
75static int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol,
76 struct snd_ctl_elem_value *ucontrol);
77static int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit);
78static int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name,
79 const char *suffix);
80static int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src,
81 const char *dst, const char *suffix);
82static int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1,
83 const char *s2, const char *suffix);
84static void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src,
85 const char *dst);
86static void snd_ac97_restore_status(struct snd_ac97 *ac97);
87static void snd_ac97_restore_iec958(struct snd_ac97 *ac97);
88static int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol,
89 struct snd_ctl_elem_info *uinfo);
90static int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol,
91 struct snd_ctl_elem_value *ucontrol);
92static int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol,
93 struct snd_ctl_elem_value *ucontrol);
diff --git a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c
index 3758d07182f8..4281e6d0c5b6 100644
--- a/sound/pci/ac97/ac97_pcm.c
+++ b/sound/pci/ac97/ac97_pcm.c
@@ -34,7 +34,6 @@
34#include <sound/control.h> 34#include <sound/control.h>
35#include <sound/ac97_codec.h> 35#include <sound/ac97_codec.h>
36#include <sound/asoundef.h> 36#include <sound/asoundef.h>
37#include "ac97_patch.h"
38#include "ac97_id.h" 37#include "ac97_id.h"
39#include "ac97_local.h" 38#include "ac97_local.h"
40 39