]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'topic/pcsp-fix' into topic/misc
authorTakashi Iwai <tiwai@suse.de>
Sat, 20 Dec 2008 22:39:47 +0000 (23:39 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 20 Dec 2008 22:39:47 +0000 (23:39 +0100)
13 files changed:
sound/ac97_bus.c
sound/drivers/Kconfig
sound/isa/sb/sb8.c
sound/pci/ac97/ac97_codec.c
sound/pci/ca0106/ca0106.h
sound/pci/ca0106/ca0106_main.c
sound/pci/cs46xx/cs46xx_lib.c
sound/pci/mixart/mixart.c
sound/pci/pcxhr/pcxhr.c
sound/pci/riptide/riptide.c
sound/usb/caiaq/caiaq-control.c
sound/usb/caiaq/caiaq-device.c
sound/usb/usx2y/usb_stream.c

index 7fa37e15f1961b8c6b48834bc4886c403bcb568c..a351dd0a09c7dc0eb53daa0b2cedb9c625ba9225 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/string.h>
+#include <sound/ac97_codec.h>
 
 /*
  * Let drivers decide whether they want to support given codec from their
index 255fd18b9aecc357730f16c1670706d5c5d95c1d..0bcf14640fdedf35886a6eaf5e7a5c1ab8a6469b 100644 (file)
@@ -163,7 +163,7 @@ config SND_ML403_AC97CR
 
 config SND_AC97_POWER_SAVE
        bool "AC97 Power-Saving Mode"
-       depends on SND_AC97_CODEC && EXPERIMENTAL
+       depends on SND_AC97_CODEC
        default n
        help
          Say Y here to enable the aggressive power-saving support of
index 667eccc676a40a8898f887ef21288cefa717624f..ea06877be4b135fb8256de12ebe416dc9df46901 100644 (file)
@@ -140,8 +140,10 @@ static int __devinit snd_sb8_probe(struct device *pdev, unsigned int dev)
                                break;
                        }
                }
-               if (i >= ARRAY_SIZE(possible_ports))
+               if (i >= ARRAY_SIZE(possible_ports)) {
+                       err = -EINVAL;
                        goto _err;
+               }
        }
        acard->chip = chip;
                        
index bd510eceff1ff413422c0c5d004440e7a2fd44af..e2b843b4f9d0963c681c6fe877bddd48bdd2ee7c 100644 (file)
@@ -175,7 +175,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
 { 0x574d4C04, 0xffffffff, "WM9704M,WM9704Q",   patch_wolfson04, NULL},
 { 0x574d4C05, 0xffffffff, "WM9705,WM9710",     patch_wolfson05, NULL},
 { 0x574d4C09, 0xffffffff, "WM9709",            NULL,           NULL},
-{ 0x574d4C12, 0xffffffff, "WM9711,WM9712",     patch_wolfson11, NULL},
+{ 0x574d4C12, 0xffffffff, "WM9711,WM9712,WM9715",      patch_wolfson11, NULL},
 { 0x574d4c13, 0xffffffff, "WM9713,WM9714",     patch_wolfson13, NULL, AC97_DEFAULT_POWER_OFF},
 { 0x594d4800, 0xffffffff, "YMF743",            patch_yamaha_ymf743,    NULL },
 { 0x594d4802, 0xffffffff, "YMF752",            NULL,           NULL },
index 74175fc80c7f447dbc0441c325c04abf29350e91..3faccb6ecad9b3507d0111dcdb6b0313c5f25609 100644 (file)
@@ -664,10 +664,14 @@ struct snd_ca0106_pcm {
 struct snd_ca0106_details {
         u32 serial;
         char * name;
-        int ac97;
-       int gpio_type;
-       int i2c_adc;
-       int spi_dac;
+       int ac97;       /* ac97 = 0 -> Select MIC, Line in, TAD in, AUX in.
+                          ac97 = 1 -> Default to AC97 in. */
+       int gpio_type;  /* gpio_type = 1 -> shared mic-in/line-in
+                          gpio_type = 2 -> shared side-out/line-in. */
+       int i2c_adc;    /* with i2c_adc=1, the driver adds some capture volume
+                          controls, phone, mic, line-in and aux. */
+       int spi_dac;    /* spi_dac=1 adds the mute switch for each analog
+                          output, front, rear, etc. */
 };
 
 // definition of the chip-specific record
index 88fbf285d2b74ea6cf1ccc701398d0e730784840..6ac19364631bc2e27387540e94dfd60948b33c05 100644 (file)
@@ -254,7 +254,7 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
           .name   = "MSI K8N Diamond MB",
           .gpio_type = 2,
           .i2c_adc = 1,
-          .spi_dac = 2 } ,
+          .spi_dac = 1 } ,
         /* Shuttle XPC SD31P which has an onboard Creative Labs
          * Sound Blaster Live! 24-bit EAX
          * high-definition 7.1 audio processor".
index fb6dc398025753c08fd861ed134677dd675d1117..8ab07aa63652b010c9337c7a83c66a8e2a1c5218 100644 (file)
@@ -3640,7 +3640,10 @@ int snd_cs46xx_resume(struct pci_dev *pci)
 {
        struct snd_card *card = pci_get_drvdata(pci);
        struct snd_cs46xx *chip = card->private_data;
-       int i, amp_saved;
+       int amp_saved;
+#ifdef CONFIG_SND_CS46XX_NEW_DSP
+       int i;
+#endif
 
        pci_set_power_state(pci, PCI_D0);
        pci_restore_state(pci);
index ae7601f353a706d0f69ca0a31195104b3040beb8..f23a73577c2219cb7da2b03317bf1106b7e1f981 100644 (file)
@@ -1010,7 +1010,7 @@ static int __devinit snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *
                .dev_free = snd_mixart_chip_dev_free,
        };
 
-       mgr->chip[idx] = chip = kzalloc(sizeof(*chip), GFP_KERNEL);
+       chip = kzalloc(sizeof(*chip), GFP_KERNEL);
        if (! chip) {
                snd_printk(KERN_ERR "cannot allocate chip\n");
                return -ENOMEM;
@@ -1025,6 +1025,7 @@ static int __devinit snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *
                return err;
        }
 
+       mgr->chip[idx] = chip;
        snd_card_set_dev(card, &mgr->pci->dev);
 
        return 0;
@@ -1377,6 +1378,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
                sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i);
 
                if ((err = snd_mixart_create(mgr, card, i)) < 0) {
+                       snd_card_free(card);
                        snd_mixart_free(mgr);
                        return err;
                }
index 73de6e989b3d4ab78069d8b24240637890fd3131..7d2b136295d5304249aef42362dbf7f148487973 100644 (file)
@@ -1024,7 +1024,7 @@ static int __devinit pcxhr_create(struct pcxhr_mgr *mgr, struct snd_card *card,
                .dev_free = pcxhr_chip_dev_free,
        };
 
-       mgr->chip[idx] = chip = kzalloc(sizeof(*chip), GFP_KERNEL);
+       chip = kzalloc(sizeof(*chip), GFP_KERNEL);
        if (! chip) {
                snd_printk(KERN_ERR "cannot allocate chip\n");
                return -ENOMEM;
@@ -1050,6 +1050,7 @@ static int __devinit pcxhr_create(struct pcxhr_mgr *mgr, struct snd_card *card,
                return err;
        }
 
+       mgr->chip[idx] = chip;
        snd_card_set_dev(card, &mgr->pci->dev);
 
        return 0;
@@ -1310,6 +1311,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
                sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i);
 
                if ((err = pcxhr_create(mgr, card, i)) < 0) {
+                       snd_card_free(card);
                        pcxhr_free(mgr);
                        return err;
                }
index e9f0706ed3e45d2368ebe7170682b74290b15159..d0ccfc68c52229cb2ed5ccf78d7afb6f667bcd9d 100644 (file)
@@ -172,7 +172,7 @@ MODULE_PARM_DESC(opl3_port, "OPL3 port # for Riptide driver.");
 
 #define MAX_WRITE_RETRY  10    /* cmd interface limits */
 #define MAX_ERROR_COUNT  10
-#define CMDIF_TIMEOUT    500000
+#define CMDIF_TIMEOUT    50000
 #define RESET_TRIES      5
 
 #define READ_PORT_ULONG(p)     inl((unsigned long)&(p))
index 798ca124da58756e0aedfb3ab15ce2f2750abd6c..ccd763dd7167e2ce37b469098807634a1500aab9 100644 (file)
@@ -247,69 +247,56 @@ static struct caiaq_controller a8dj_controller[] = {
        { "Software lock",                      40              }
 };
 
-int __devinit snd_usb_caiaq_control_init(struct snd_usb_caiaqdev *dev)
+static int __devinit add_controls(struct caiaq_controller *c, int num,
+                                 struct snd_usb_caiaqdev *dev)
 {
-       int i;
+       int i, ret;
        struct snd_kcontrol *kc;
 
+       for (i = 0; i < num; i++, c++) {
+               kcontrol_template.name = c->name;
+               kcontrol_template.private_value = c->index;
+               kc = snd_ctl_new1(&kcontrol_template, dev);
+               ret = snd_ctl_add(dev->chip.card, kc);
+               if (ret < 0)
+                       return ret;
+       }
+
+       return 0;
+}
+
+int __devinit snd_usb_caiaq_control_init(struct snd_usb_caiaqdev *dev)
+{
+       int ret = 0;
+
        switch (dev->chip.usb_id) {
        case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AK1):
-               for (i = 0; i < ARRAY_SIZE(ak1_controller); i++) {
-                       struct caiaq_controller *c = ak1_controller + i;
-                       kcontrol_template.name = c->name;
-                       kcontrol_template.private_value = c->index;
-                       kc = snd_ctl_new1(&kcontrol_template, dev);
-                       snd_ctl_add(dev->chip.card, kc);
-               }
-
+               ret = add_controls(ak1_controller,
+                       ARRAY_SIZE(ak1_controller), dev);
                break;
 
        case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_RIGKONTROL2):
-               for (i = 0; i < ARRAY_SIZE(rk2_controller); i++) {
-                       struct caiaq_controller *c = rk2_controller + i;
-                       kcontrol_template.name = c->name;
-                       kcontrol_template.private_value = c->index;
-                       kc = snd_ctl_new1(&kcontrol_template, dev);
-                       snd_ctl_add(dev->chip.card, kc);
-               }
-
+               ret = add_controls(rk2_controller,
+                       ARRAY_SIZE(rk2_controller), dev);
                break;
 
        case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_RIGKONTROL3):
-               for (i = 0; i < ARRAY_SIZE(rk3_controller); i++) {
-                       struct caiaq_controller *c = rk3_controller + i;
-                       kcontrol_template.name = c->name;
-                       kcontrol_template.private_value = c->index;
-                       kc = snd_ctl_new1(&kcontrol_template, dev);
-                       snd_ctl_add(dev->chip.card, kc);
-               }
-
+               ret = add_controls(rk3_controller,
+                       ARRAY_SIZE(rk3_controller), dev);
                break;
 
        case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER):
        case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2):
-               for (i = 0; i < ARRAY_SIZE(kore_controller); i++) {
-                       struct caiaq_controller *c = kore_controller + i;
-                       kcontrol_template.name = c->name;
-                       kcontrol_template.private_value = c->index;
-                       kc = snd_ctl_new1(&kcontrol_template, dev);
-                       snd_ctl_add(dev->chip.card, kc);
-               }
-
+               ret = add_controls(kore_controller,
+                       ARRAY_SIZE(kore_controller), dev);
                break;
 
        case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_AUDIO8DJ):
-               for (i = 0; i < ARRAY_SIZE(a8dj_controller); i++) {
-                       struct caiaq_controller *c = a8dj_controller + i;
-                       kcontrol_template.name = c->name;
-                       kcontrol_template.private_value = c->index;
-                       kc = snd_ctl_new1(&kcontrol_template, dev);
-                       snd_ctl_add(dev->chip.card, kc);
-               }
-
+               ret = add_controls(a8dj_controller,
+                       ARRAY_SIZE(a8dj_controller), dev);
                break;
        }
 
-       return 0;
+       return ret;
 }
 
index 83175083e50f8c60852cc0250fd26ace2038afba..b143ef7152f7b7b734ff08c58ffdb014b518b6e0 100644 (file)
@@ -42,7 +42,7 @@
 #endif
 
 MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
-MODULE_DESCRIPTION("caiaq USB audio, version 1.3.8");
+MODULE_DESCRIPTION("caiaq USB audio, version 1.3.9");
 MODULE_LICENSE("GPL");
 MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2},"
                         "{Native Instruments, RigKontrol3},"
index ff23cc1ce3b9f92e9f7e3739c48f8e509c6fea37..70b96355ca4cfba36b726c0fd11d0c62bbeaa359 100644 (file)
@@ -276,7 +276,8 @@ static void subs_set_complete(struct urb **urbs, void (*complete)(struct urb *))
        }
 }
 
-int usb_stream_prepare_playback(struct usb_stream_kernel *sk, struct urb *inurb)
+static int usb_stream_prepare_playback(struct usb_stream_kernel *sk,
+               struct urb *inurb)
 {
        struct usb_stream *s = sk->s;
        struct urb *io;