Ignore:
Timestamp:
Apr 3, 2017, 4:51:56 PM (9 years ago)
Author:
David Azarewicz
Message:

Merged/reintegrated v2 branch into trunk. Trunk is now v2

Location:
GPL/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio.c

    r464 r598  
    6767MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME);
    6868
    69 static struct pci_device_id snd_cs5535audio_ids[] = {
     69static DEFINE_PCI_DEVICE_TABLE(snd_cs5535audio_ids) = {
    7070        { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) },
    7171        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) },
     
    390390static void __devexit snd_cs5535audio_remove(struct pci_dev *pci)
    391391{
     392        olpc_quirks_cleanup();
    392393        snd_card_free(pci_get_drvdata(pci));
    393394        pci_set_drvdata(pci, NULL);
  • GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio.h

    r455 r598  
    100100#endif
    101101
    102 #if defined(CONFIG_OLPC) && defined(CONFIG_MGEODE_LX)
     102#ifdef CONFIG_OLPC
    103103void __devinit olpc_prequirks(struct snd_card *card,
    104104                struct snd_ac97_template *ac97);
    105105int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97);
     106void __devexit olpc_quirks_cleanup(void);
    106107void olpc_analog_input(struct snd_ac97 *ac97, int on);
    107108void olpc_mic_bias(struct snd_ac97 *ac97, int on);
     
    129130        return 0;
    130131}
     132static inline void olpc_quirks_cleanup(void) { }
    131133static inline void olpc_analog_input(struct snd_ac97 *ac97, int on) { }
    132134static inline void olpc_mic_bias(struct snd_ac97 *ac97, int on) { }
  • GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio_olpc.c

    r455 r598  
    1414#include <sound/control.h>
    1515#include <sound/ac97_codec.h>
     16#include <linux/gpio.h>
    1617
    1718#include <asm/olpc.h>
    1819#include "cs5535audio.h"
     20
     21#define DRV_NAME "cs5535audio-olpc"
    1922
    2023/*
     
    3942
    4043        /* 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);
    4545}
    4646
     
    7474static int olpc_dc_get(struct snd_kcontrol *kctl, struct snd_ctl_elem_value *v)
    7575{
    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);
    7877        return 0;
    7978}
     
    154153                return 0;
    155154
     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
    156161        /* drop the original AD1888 HPF control */
    157162        memset(&elem, 0, sizeof(elem));
     
    170175                err = snd_ctl_add(card, snd_ctl_new1(&olpc_cs5535audio_ctls[i],
    171176                                ac97->private_data));
    172                 if (err < 0)
     177                if (err < 0) {
     178                        gpio_free(OLPC_GPIO_MIC_AC);
    173179                        return err;
     180                }
    174181        }
    175182
     
    178185        return 0;
    179186}
     187
     188void __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  
    2424
    2525#include <linux/init.h>
    26 #include <linux/slab.h>
    2726#include <linux/pci.h>
    2827#include <sound/core.h>
  • GPL/trunk/alsa-kernel/pci/cs5535audio/cs5535audio_pm.c

    r455 r598  
    2020
    2121#include <linux/init.h>
    22 #include <linux/slab.h>
    2322#include <linux/pci.h>
    2423#include <linux/delay.h>
     
    9291
    9392        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);
    10094        if (pci_enable_device(pci) < 0) {
    10195                printk(KERN_ERR "cs5535audio: pci_enable_device failed, "
Note: See TracChangeset for help on using the changeset viewer.