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

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

Version: ~ [ linux-5.18-rc6 ] ~ [ linux-5.17.6 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.38 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.114 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.192 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.241 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.277 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.312 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-or-later
  2 /*
  3  *   ALSA driver for VT1720/VT1724 (Envy24PT/Envy24HT)
  4  *
  5  *   Lowlevel functions for VT1720-based motherboards
  6  *
  7  *      Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
  8  */      
  9 
 10 #include <linux/delay.h>
 11 #include <linux/interrupt.h>
 12 #include <linux/init.h>
 13 #include <sound/core.h>
 14 
 15 #include "ice1712.h"
 16 #include "envy24ht.h"
 17 #include "vt1720_mobo.h"
 18 
 19 
 20 static int k8x800_init(struct snd_ice1712 *ice)
 21 {
 22         ice->vt1720 = 1;
 23 
 24         /* VT1616 codec */
 25         ice->num_total_dacs = 6;
 26         ice->num_total_adcs = 2;
 27 
 28         /* WM8728 codec */
 29         /* FIXME: TODO */
 30 
 31         return 0;
 32 }
 33 
 34 static int k8x800_add_controls(struct snd_ice1712 *ice)
 35 {
 36         /* FIXME: needs some quirks for VT1616? */
 37         return 0;
 38 }
 39 
 40 /* EEPROM image */
 41 
 42 static const unsigned char k8x800_eeprom[] = {
 43         [ICE_EEP2_SYSCONF]     = 0x01,  /* clock 256, 1ADC, 2DACs */
 44         [ICE_EEP2_ACLINK]      = 0x02,  /* ACLINK, packed */
 45         [ICE_EEP2_I2S]         = 0x00,  /* - */
 46         [ICE_EEP2_SPDIF]       = 0x00,  /* - */
 47         [ICE_EEP2_GPIO_DIR]    = 0xff,
 48         [ICE_EEP2_GPIO_DIR1]   = 0xff,
 49         [ICE_EEP2_GPIO_DIR2]   = 0x00,  /* - */
 50         [ICE_EEP2_GPIO_MASK]   = 0xff,
 51         [ICE_EEP2_GPIO_MASK1]  = 0xff,
 52         [ICE_EEP2_GPIO_MASK2]  = 0x00,  /* - */
 53         [ICE_EEP2_GPIO_STATE]  = 0x00,
 54         [ICE_EEP2_GPIO_STATE1] = 0x00,
 55         [ICE_EEP2_GPIO_STATE2] = 0x00,  /* - */
 56 };
 57 
 58 static const unsigned char sn25p_eeprom[] = {
 59         [ICE_EEP2_SYSCONF]     = 0x01,  /* clock 256, 1ADC, 2DACs */
 60         [ICE_EEP2_ACLINK]      = 0x02,  /* ACLINK, packed */
 61         [ICE_EEP2_I2S]         = 0x00,  /* - */
 62         [ICE_EEP2_SPDIF]       = 0x41,  /* - */
 63         [ICE_EEP2_GPIO_DIR]    = 0xff,
 64         [ICE_EEP2_GPIO_DIR1]   = 0xff,
 65         [ICE_EEP2_GPIO_DIR2]   = 0x00,  /* - */
 66         [ICE_EEP2_GPIO_MASK]   = 0xff,
 67         [ICE_EEP2_GPIO_MASK1]  = 0xff,
 68         [ICE_EEP2_GPIO_MASK2]  = 0x00,  /* - */
 69         [ICE_EEP2_GPIO_STATE]  = 0x00,
 70         [ICE_EEP2_GPIO_STATE1] = 0x00,
 71         [ICE_EEP2_GPIO_STATE2] = 0x00,  /* - */
 72 };
 73 
 74 
 75 /* entry point */
 76 struct snd_ice1712_card_info snd_vt1720_mobo_cards[] = {
 77         {
 78                 .subvendor = VT1720_SUBDEVICE_K8X800,
 79                 .name = "Albatron K8X800 Pro II",
 80                 .model = "k8x800",
 81                 .chip_init = k8x800_init,
 82                 .build_controls = k8x800_add_controls,
 83                 .eeprom_size = sizeof(k8x800_eeprom),
 84                 .eeprom_data = k8x800_eeprom,
 85         },
 86         {
 87                 .subvendor = VT1720_SUBDEVICE_ZNF3_150,
 88                 .name = "Chaintech ZNF3-150",
 89                 /* identical with k8x800 */
 90                 .chip_init = k8x800_init,
 91                 .build_controls = k8x800_add_controls,
 92                 .eeprom_size = sizeof(k8x800_eeprom),
 93                 .eeprom_data = k8x800_eeprom,
 94         },
 95         {
 96                 .subvendor = VT1720_SUBDEVICE_ZNF3_250,
 97                 .name = "Chaintech ZNF3-250",
 98                 /* identical with k8x800 */
 99                 .chip_init = k8x800_init,
100                 .build_controls = k8x800_add_controls,
101                 .eeprom_size = sizeof(k8x800_eeprom),
102                 .eeprom_data = k8x800_eeprom,
103         },
104         {
105                 .subvendor = VT1720_SUBDEVICE_9CJS,
106                 .name = "Chaintech 9CJS",
107                 /* identical with k8x800 */
108                 .chip_init = k8x800_init,
109                 .build_controls = k8x800_add_controls,
110                 .eeprom_size = sizeof(k8x800_eeprom),
111                 .eeprom_data = k8x800_eeprom,
112         },
113         {
114                 .subvendor = VT1720_SUBDEVICE_SN25P,
115                 .name = "Shuttle SN25P",
116                 .model = "sn25p",
117                 .chip_init = k8x800_init,
118                 .build_controls = k8x800_add_controls,
119                 .eeprom_size = sizeof(k8x800_eeprom),
120                 .eeprom_data = sn25p_eeprom,
121         },
122         { } /* terminator */
123 };
124 
125 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp