Changeset 598 for GPL/trunk/alsa-kernel/pci/cs5535audio
- Timestamp:
- Apr 3, 2017, 4:51:56 PM (9 years ago)
- Location:
- GPL/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
-
Property svn:mergeinfo
set to
/GPL/branches/uniaud32-2.1.x merged eligible
-
Property svn:mergeinfo
set to
-
GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio.c
r464 r598 67 67 MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME); 68 68 69 static struct pci_device_id snd_cs5535audio_ids[]= {69 static DEFINE_PCI_DEVICE_TABLE(snd_cs5535audio_ids) = { 70 70 { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) }, 71 71 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) }, … … 390 390 static void __devexit snd_cs5535audio_remove(struct pci_dev *pci) 391 391 { 392 olpc_quirks_cleanup(); 392 393 snd_card_free(pci_get_drvdata(pci)); 393 394 pci_set_drvdata(pci, NULL); -
GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio.h
r455 r598 100 100 #endif 101 101 102 #if defined(CONFIG_OLPC) && defined(CONFIG_MGEODE_LX)102 #ifdef CONFIG_OLPC 103 103 void __devinit olpc_prequirks(struct snd_card *card, 104 104 struct snd_ac97_template *ac97); 105 105 int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97); 106 void __devexit olpc_quirks_cleanup(void); 106 107 void olpc_analog_input(struct snd_ac97 *ac97, int on); 107 108 void olpc_mic_bias(struct snd_ac97 *ac97, int on); … … 129 130 return 0; 130 131 } 132 static inline void olpc_quirks_cleanup(void) { } 131 133 static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { } 132 134 static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { } -
GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio_olpc.c
r455 r598 14 14 #include <sound/control.h> 15 15 #include <sound/ac97_codec.h> 16 #include <linux/gpio.h> 16 17 17 18 #include <asm/olpc.h> 18 19 #include "cs5535audio.h" 20 21 #define DRV_NAME "cs5535audio-olpc" 19 22 20 23 /* … … 39 42 40 43 /* set Analog Input through GPIO */ 41 if (on) 42 geode_gpio_set(OLPC_GPIO_MIC_AC, GPIO_OUTPUT_VAL); 43 else 44 geode_gpio_clear(OLPC_GPIO_MIC_AC, GPIO_OUTPUT_VAL); 44 gpio_set_value(OLPC_GPIO_MIC_AC, on); 45 45 } 46 46 … … 74 74 static int olpc_dc_get(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v) 75 75 { 76 v->value.integer.value[0] = geode_gpio_isset(OLPC_GPIO_MIC_AC, 77 GPIO_OUTPUT_VAL); 76 v->value.integer.value[0] = gpio_get_value(OLPC_GPIO_MIC_AC); 78 77 return 0; 79 78 } … … 154 153 return 0; 155 154 155 if (gpio_request(OLPC_GPIO_MIC_AC, DRV_NAME)) { 156 printk(KERN_ERR DRV_NAME ": unable to allocate MIC GPIO\n"); 157 return -EIO; 158 } 159 gpio_direction_output(OLPC_GPIO_MIC_AC, 0); 160 156 161 /* drop the original AD1888 HPF control */ 157 162 memset(&elem, 0, sizeof(elem)); … … 170 175 err = snd_ctl_add(card, snd_ctl_new1(&olpc_cs5535audio_ctls[i], 171 176 ac97->private_data)); 172 if (err < 0) 177 if (err < 0) { 178 gpio_free(OLPC_GPIO_MIC_AC); 173 179 return err; 180 } 174 181 } 175 182 … … 178 185 return 0; 179 186 } 187 188 void __devexit olpc_quirks_cleanup(void) 189 { 190 gpio_free(OLPC_GPIO_MIC_AC); 191 } -
GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio_pcm.c
r455 r598 24 24 25 25 #include <linux/init.h> 26 #include <linux/slab.h>27 26 #include <linux/pci.h> 28 27 #include <sound/core.h> -
GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio_pm.c
r455 r598 20 20 21 21 #include <linux/init.h> 22 #include <linux/slab.h>23 22 #include <linux/pci.h> 24 23 #include <linux/delay.h> … … 92 91 93 92 pci_set_power_state(pci, PCI_D0); 94 if (pci_restore_state(pci) < 0) { 95 printk(KERN_ERR "cs5535audio: pci_restore_state failed, " 96 "disabling device\n"); 97 snd_card_disconnect(card); 98 return -EIO; 99 } 93 pci_restore_state(pci); 100 94 if (pci_enable_device(pci) < 0) { 101 95 printk(KERN_ERR "cs5535audio: pci_enable_device failed, "
Note:
See TracChangeset
for help on using the changeset viewer.