~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/pci/ac97/ac97_patch.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/pci/ac97/ac97_patch.h (Architecture sparc64) and /sound/pci/ac97/ac97_patch.h (Architecture alpha)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*                                                  2 /*
  3  *  Copyright (c) by Jaroslav Kysela <perex@pe      3  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
  4  *  Universal interface for Audio Codec '97         4  *  Universal interface for Audio Codec '97
  5  *                                                  5  *
  6  *  For more details look to AC '97 component       6  *  For more details look to AC '97 component specification revision 2.2
  7  *  by Intel Corporation (http://developer.int      7  *  by Intel Corporation (http://developer.intel.com).
  8  */                                                 8  */
  9                                                     9 
 10 #define AC97_SINGLE_VALUE(reg,shift,mask,inver     10 #define AC97_SINGLE_VALUE(reg,shift,mask,invert) \
 11         ((reg) | ((shift) << 8) | ((shift) <<      11         ((reg) | ((shift) << 8) | ((shift) << 12) | ((mask) << 16) | \
 12          ((invert) << 24))                         12          ((invert) << 24))
 13 #define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,     13 #define AC97_PAGE_SINGLE_VALUE(reg,shift,mask,invert,page) \
 14         (AC97_SINGLE_VALUE(reg,shift,mask,inve     14         (AC97_SINGLE_VALUE(reg,shift,mask,invert) | (1<<25) | ((page) << 26))
 15 #define AC97_SINGLE(xname, reg, shift, mask, i     15 #define AC97_SINGLE(xname, reg, shift, mask, invert) \
 16 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name =     16 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
 17   .info = snd_ac97_info_volsw,          \          17   .info = snd_ac97_info_volsw,          \
 18   .get = snd_ac97_get_volsw, .put = snd_ac97_p     18   .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
 19   .private_value =  AC97_SINGLE_VALUE(reg, shi     19   .private_value =  AC97_SINGLE_VALUE(reg, shift, mask, invert) }
 20 #define AC97_PAGE_SINGLE(xname, reg, shift, ma     20 #define AC97_PAGE_SINGLE(xname, reg, shift, mask, invert, page)         \
 21 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name =     21 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
 22   .info = snd_ac97_info_volsw,          \          22   .info = snd_ac97_info_volsw,          \
 23   .get = snd_ac97_get_volsw, .put = snd_ac97_p     23   .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
 24   .private_value =  AC97_PAGE_SINGLE_VALUE(reg     24   .private_value =  AC97_PAGE_SINGLE_VALUE(reg, shift, mask, invert, page) }
 25 #define AC97_DOUBLE(xname, reg, shift_left, sh     25 #define AC97_DOUBLE(xname, reg, shift_left, shift_right, mask, invert) \
 26 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name =     26 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
 27   .info = snd_ac97_info_volsw,          \          27   .info = snd_ac97_info_volsw,          \
 28   .get = snd_ac97_get_volsw, .put = snd_ac97_p     28   .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \
 29   .private_value = (reg) | ((shift_left) << 8)     29   .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) }
 30                                                    30 
 31 /* enum control */                                 31 /* enum control */
 32 struct ac97_enum {                                 32 struct ac97_enum {
 33         unsigned char reg;                         33         unsigned char reg;
 34         unsigned char shift_l;                     34         unsigned char shift_l;
 35         unsigned char shift_r;                     35         unsigned char shift_r;
 36         unsigned short mask;                       36         unsigned short mask;
 37         const char * const *texts;                 37         const char * const *texts;
 38 };                                                 38 };
 39                                                    39 
 40 #define AC97_ENUM_DOUBLE(xreg, xshift_l, xshif     40 #define AC97_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \
 41 { .reg = xreg, .shift_l = xshift_l, .shift_r =     41 { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
 42   .mask = xmask, .texts = xtexts }                 42   .mask = xmask, .texts = xtexts }
 43 #define AC97_ENUM_SINGLE(xreg, xshift, xmask,      43 #define AC97_ENUM_SINGLE(xreg, xshift, xmask, xtexts) \
 44         AC97_ENUM_DOUBLE(xreg, xshift, xshift,     44         AC97_ENUM_DOUBLE(xreg, xshift, xshift, xmask, xtexts)
 45 #define AC97_ENUM(xname, xenum) \                  45 #define AC97_ENUM(xname, xenum) \
 46 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name =     46 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
 47   .info = snd_ac97_info_enum_double,               47   .info = snd_ac97_info_enum_double,                \
 48   .get = snd_ac97_get_enum_double, .put = snd_     48   .get = snd_ac97_get_enum_double, .put = snd_ac97_put_enum_double, \
 49   .private_value = (unsigned long)&xenum }         49   .private_value = (unsigned long)&xenum }
 50                                                    50 
 51 /* ac97_codec.c */                                 51 /* ac97_codec.c */
 52 static const struct snd_kcontrol_new snd_ac97_     52 static const struct snd_kcontrol_new snd_ac97_controls_3d[];
 53 static const struct snd_kcontrol_new snd_ac97_     53 static const struct snd_kcontrol_new snd_ac97_controls_spdif[];
 54 static struct snd_kcontrol *snd_ac97_cnew(cons     54 static struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template,
 55                                           stru     55                                           struct snd_ac97 * ac97);
 56 static int snd_ac97_info_volsw(struct snd_kcon     56 static int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol,
 57                                struct snd_ctl_     57                                struct snd_ctl_elem_info *uinfo);
 58 static int snd_ac97_get_volsw(struct snd_kcont     58 static int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol,
 59                               struct snd_ctl_e     59                               struct snd_ctl_elem_value *ucontrol);
 60 static int snd_ac97_put_volsw(struct snd_kcont     60 static int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol,
 61                               struct snd_ctl_e     61                               struct snd_ctl_elem_value *ucontrol);
 62 static int snd_ac97_try_bit(struct snd_ac97 *      62 static int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit);
 63 static int snd_ac97_remove_ctl(struct snd_ac97     63 static int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name,
 64                                const char *suf     64                                const char *suffix);
 65 static int snd_ac97_rename_ctl(struct snd_ac97     65 static int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src,
 66                                const char *dst     66                                const char *dst, const char *suffix);
 67 static int snd_ac97_swap_ctl(struct snd_ac97 *     67 static int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1,
 68                              const char *s2, c     68                              const char *s2, const char *suffix);
 69 static void snd_ac97_rename_vol_ctl(struct snd     69 static void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src,
 70                                     const char     70                                     const char *dst);
 71 #ifdef CONFIG_PM                                   71 #ifdef CONFIG_PM
 72 static void snd_ac97_restore_status(struct snd     72 static void snd_ac97_restore_status(struct snd_ac97 *ac97);
 73 static void snd_ac97_restore_iec958(struct snd     73 static void snd_ac97_restore_iec958(struct snd_ac97 *ac97);
 74 #endif                                             74 #endif
 75 static int snd_ac97_info_enum_double(struct sn     75 static int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol,
 76                                      struct sn     76                                      struct snd_ctl_elem_info *uinfo);
 77 static int snd_ac97_get_enum_double(struct snd     77 static int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol,
 78                                     struct snd     78                                     struct snd_ctl_elem_value *ucontrol);
 79 static int snd_ac97_put_enum_double(struct snd     79 static int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol,
 80                                     struct snd     80                                     struct snd_ctl_elem_value *ucontrol);
 81                                                    81 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php