aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/cs46xx.h3
-rw-r--r--include/sound/driver.h4
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c99
3 files changed, 0 insertions, 106 deletions
diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h
index 6b40ee60f4c5..e3005a674a24 100644
--- a/include/sound/cs46xx.h
+++ b/include/sound/cs46xx.h
@@ -1708,9 +1708,6 @@ struct snd_cs46xx {
1708 1708
1709 struct gameport *gameport; 1709 struct gameport *gameport;
1710 1710
1711#ifdef CONFIG_SND_CS46XX_DEBUG_GPIO
1712 int current_gpio;
1713#endif
1714#ifdef CONFIG_SND_CS46XX_NEW_DSP 1711#ifdef CONFIG_SND_CS46XX_NEW_DSP
1715 struct mutex spos_mutex; 1712 struct mutex spos_mutex;
1716 1713
diff --git a/include/sound/driver.h b/include/sound/driver.h
index 5ccb6c5feecb..1889929d1831 100644
--- a/include/sound/driver.h
+++ b/include/sound/driver.h
@@ -38,10 +38,6 @@
38#define CONFIG_SND_MAJOR 116 38#define CONFIG_SND_MAJOR 116
39#endif 39#endif
40 40
41#ifndef CONFIG_SND_DEBUG
42#undef CONFIG_SND_DEBUG_MEMORY
43#endif
44
45#ifdef ALSA_BUILD 41#ifdef ALSA_BUILD
46#include "adriver.h" 42#include "adriver.h"
47#endif 43#endif
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 2c7bfc9fef61..8c44fefd15fc 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -2084,71 +2084,6 @@ static int snd_cs46xx_spdif_stream_put(struct snd_kcontrol *kcontrol,
2084#endif /* CONFIG_SND_CS46XX_NEW_DSP */ 2084#endif /* CONFIG_SND_CS46XX_NEW_DSP */
2085 2085
2086 2086
2087#ifdef CONFIG_SND_CS46XX_DEBUG_GPIO
2088static int snd_cs46xx_egpio_select_info(struct snd_kcontrol *kcontrol,
2089 struct snd_ctl_elem_info *uinfo)
2090{
2091 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
2092 uinfo->count = 1;
2093 uinfo->value.integer.min = 0;
2094 uinfo->value.integer.max = 8;
2095 return 0;
2096}
2097
2098static int snd_cs46xx_egpio_select_get(struct snd_kcontrol *kcontrol,
2099 struct snd_ctl_elem_value *ucontrol)
2100{
2101 struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
2102 ucontrol->value.integer.value[0] = chip->current_gpio;
2103
2104 return 0;
2105}
2106
2107static int snd_cs46xx_egpio_select_put(struct snd_kcontrol *kcontrol,
2108 struct snd_ctl_elem_value *ucontrol)
2109{
2110 struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
2111 int change = (chip->current_gpio != ucontrol->value.integer.value[0]);
2112 chip->current_gpio = ucontrol->value.integer.value[0];
2113
2114 return change;
2115}
2116
2117
2118static int snd_cs46xx_egpio_get(struct snd_kcontrol *kcontrol,
2119 struct snd_ctl_elem_value *ucontrol)
2120{
2121 struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
2122 int reg = kcontrol->private_value;
2123
2124 snd_printdd ("put: reg = %04x, gpio %02x\n",reg,chip->current_gpio);
2125 ucontrol->value.integer.value[0] =
2126 (snd_cs46xx_peekBA0(chip, reg) & (1 << chip->current_gpio)) ? 1 : 0;
2127
2128 return 0;
2129}
2130
2131static int snd_cs46xx_egpio_put(struct snd_kcontrol *kcontrol,
2132 struct snd_ctl_elem_value *ucontrol)
2133{
2134 struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol);
2135 int reg = kcontrol->private_value;
2136 int val = snd_cs46xx_peekBA0(chip, reg);
2137 int oldval = val;
2138 snd_printdd ("put: reg = %04x, gpio %02x\n",reg,chip->current_gpio);
2139
2140 if (ucontrol->value.integer.value[0])
2141 val |= (1 << chip->current_gpio);
2142 else
2143 val &= ~(1 << chip->current_gpio);
2144
2145 snd_cs46xx_pokeBA0(chip, reg,val);
2146 snd_printdd ("put: val %08x oldval %08x\n",val,oldval);
2147
2148 return (oldval != val);
2149}
2150#endif /* CONFIG_SND_CS46XX_DEBUG_GPIO */
2151
2152static struct snd_kcontrol_new snd_cs46xx_controls[] __devinitdata = { 2087static struct snd_kcontrol_new snd_cs46xx_controls[] __devinitdata = {
2153{ 2088{
2154 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2089 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -2241,40 +2176,6 @@ static struct snd_kcontrol_new snd_cs46xx_controls[] __devinitdata = {
2241}, 2176},
2242 2177
2243#endif 2178#endif
2244#ifdef CONFIG_SND_CS46XX_DEBUG_GPIO
2245{
2246 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2247 .name = "EGPIO select",
2248 .info = snd_cs46xx_egpio_select_info,
2249 .get = snd_cs46xx_egpio_select_get,
2250 .put = snd_cs46xx_egpio_select_put,
2251 .private_value = 0,
2252},
2253{
2254 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2255 .name = "EGPIO Input/Output",
2256 .info = snd_mixer_boolean_info,
2257 .get = snd_cs46xx_egpio_get,
2258 .put = snd_cs46xx_egpio_put,
2259 .private_value = BA0_EGPIODR,
2260},
2261{
2262 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2263 .name = "EGPIO CMOS/Open drain",
2264 .info = snd_mixer_boolean_info,
2265 .get = snd_cs46xx_egpio_get,
2266 .put = snd_cs46xx_egpio_put,
2267 .private_value = BA0_EGPIOPTR,
2268},
2269{
2270 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2271 .name = "EGPIO On/Off",
2272 .info = snd_mixer_boolean_info,
2273 .get = snd_cs46xx_egpio_get,
2274 .put = snd_cs46xx_egpio_put,
2275 .private_value = BA0_EGPIOSR,
2276},
2277#endif
2278}; 2179};
2279 2180
2280#ifdef CONFIG_SND_CS46XX_NEW_DSP 2181#ifdef CONFIG_SND_CS46XX_NEW_DSP