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

TOMOYO Linux Cross Reference
Linux/sound/pci/ice1712/amp.c

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/ice1712/amp.c (Version linux-6.12-rc7) and /sound/pci/ice1712/amp.c (Version linux-5.3.18)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 // SPDX-License-Identifier: GPL-2.0-or-later
  2 /*                                                  2 /*
  3  *   ALSA driver for ICEnsemble VT1724 (Envy24      3  *   ALSA driver for ICEnsemble VT1724 (Envy24HT)
  4  *                                                  4  *
  5  *   Lowlevel functions for Advanced Micro Per      5  *   Lowlevel functions for Advanced Micro Peripherals Ltd AUDIO2000
  6  *                                                  6  *
  7  *      Copyright (c) 2000 Jaroslav Kysela <pe      7  *      Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz>
  8  */                                                 8  */      
  9                                                     9 
 10 #include <linux/delay.h>                           10 #include <linux/delay.h>
 11 #include <linux/interrupt.h>                       11 #include <linux/interrupt.h>
 12 #include <linux/init.h>                            12 #include <linux/init.h>
 13 #include <sound/core.h>                            13 #include <sound/core.h>
 14                                                    14 
 15 #include "ice1712.h"                               15 #include "ice1712.h"
 16 #include "envy24ht.h"                              16 #include "envy24ht.h"
 17 #include "amp.h"                                   17 #include "amp.h"
 18                                                    18 
 19 static void wm_put(struct snd_ice1712 *ice, in     19 static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
 20 {                                                  20 {
 21         unsigned short cval;                       21         unsigned short cval;
 22         cval = (reg << 9) | val;                   22         cval = (reg << 9) | val;
 23         snd_vt1724_write_i2c(ice, WM_DEV, cval     23         snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff);
 24 }                                                  24 }
 25                                                    25 
 26 static int snd_vt1724_amp_init(struct snd_ice1     26 static int snd_vt1724_amp_init(struct snd_ice1712 *ice)
 27 {                                                  27 {
 28         static const unsigned short wm_inits[]     28         static const unsigned short wm_inits[] = {
 29                 WM_ATTEN_L,     0x0000, /* 0 d     29                 WM_ATTEN_L,     0x0000, /* 0 db */
 30                 WM_ATTEN_R,     0x0000, /* 0 d     30                 WM_ATTEN_R,     0x0000, /* 0 db */
 31                 WM_DAC_CTRL,    0x0008, /* 24b     31                 WM_DAC_CTRL,    0x0008, /* 24bit I2S */
 32                 WM_INT_CTRL,    0x0001, /* 24b     32                 WM_INT_CTRL,    0x0001, /* 24bit I2S */ 
 33         };                                         33         };
 34                                                    34 
 35         unsigned int i;                            35         unsigned int i;
 36                                                    36 
 37         /* only use basic functionality for no     37         /* only use basic functionality for now */
 38                                                    38 
 39         /* VT1616 6ch codec connected to PSDOU     39         /* VT1616 6ch codec connected to PSDOUT0 using packed mode */
 40         ice->num_total_dacs = 6;                   40         ice->num_total_dacs = 6;
 41         ice->num_total_adcs = 2;                   41         ice->num_total_adcs = 2;
 42                                                    42 
 43         /* Chaintech AV-710 has another WM8728     43         /* Chaintech AV-710 has another WM8728 codec connected to PSDOUT4
 44            (shared with the SPDIF output). Mix     44            (shared with the SPDIF output). Mixer control for this codec
 45            is not yet supported. */                45            is not yet supported. */
 46         if (ice->eeprom.subvendor == VT1724_SU     46         if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AV710) {
 47                 for (i = 0; i < ARRAY_SIZE(wm_     47                 for (i = 0; i < ARRAY_SIZE(wm_inits); i += 2)
 48                         wm_put(ice, wm_inits[i     48                         wm_put(ice, wm_inits[i], wm_inits[i+1]);
 49         }                                          49         }
 50                                                    50 
 51         return 0;                                  51         return 0;
 52 }                                                  52 }
 53                                                    53 
 54 static int snd_vt1724_amp_add_controls(struct      54 static int snd_vt1724_amp_add_controls(struct snd_ice1712 *ice)
 55 {                                                  55 {
 56         if (ice->ac97)                             56         if (ice->ac97)
 57                 /* we use pins 39 and 41 of th     57                 /* we use pins 39 and 41 of the VT1616 for left and right
 58                 read outputs */                    58                 read outputs */
 59                 snd_ac97_write_cache(ice->ac97     59                 snd_ac97_write_cache(ice->ac97, 0x5a,
 60                         snd_ac97_read(ice->ac9     60                         snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
 61         return 0;                                  61         return 0;
 62 }                                                  62 }
 63                                                    63 
 64                                                    64 
 65 /* entry point */                                  65 /* entry point */
 66 struct snd_ice1712_card_info snd_vt1724_amp_ca     66 struct snd_ice1712_card_info snd_vt1724_amp_cards[] = {
 67         {                                          67         {
 68                 .subvendor = VT1724_SUBDEVICE_     68                 .subvendor = VT1724_SUBDEVICE_AV710,
 69                 .name = "Chaintech AV-710",        69                 .name = "Chaintech AV-710",
 70                 .model = "av710",                  70                 .model = "av710",
 71                 .chip_init = snd_vt1724_amp_in     71                 .chip_init = snd_vt1724_amp_init,
 72                 .build_controls = snd_vt1724_a     72                 .build_controls = snd_vt1724_amp_add_controls,
 73         },                                         73         },
 74         {                                          74         {
 75                 .subvendor = VT1724_SUBDEVICE_     75                 .subvendor = VT1724_SUBDEVICE_AUDIO2000,
 76                 .name = "AMP Ltd AUDIO2000",       76                 .name = "AMP Ltd AUDIO2000",
 77                 .model = "amp2000",                77                 .model = "amp2000",
 78                 .chip_init = snd_vt1724_amp_in     78                 .chip_init = snd_vt1724_amp_init,
 79                 .build_controls = snd_vt1724_a     79                 .build_controls = snd_vt1724_amp_add_controls,
 80         },                                         80         },
 81         { } /* terminator */                       81         { } /* terminator */
 82 };                                                 82 };
 83                                                    83 
 84                                                    84 

~ [ 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