diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-20 11:40:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-20 11:40:43 -0500 |
commit | 3b6f7b9beb553ea71a6d4d76ba82cf32eb6dadd2 (patch) | |
tree | 2cd8a8d61f350aa3b00e6b0afc998544923f183e /sound | |
parent | 9be1b56a3e718aa998772019c57c398dbb19e258 (diff) | |
parent | 07a66d7c53a538e1a9759954a82bb6c07365eff9 (diff) |
Merge branch 'x86/urgent' into x86/core
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/jack.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 8 | ||||
-rw-r--r-- | sound/pci/oxygen/virtuoso.c | 17 | ||||
-rw-r--r-- | sound/usb/usbaudio.c | 20 | ||||
-rw-r--r-- | sound/usb/usbmidi.c | 1 |
5 files changed, 19 insertions, 29 deletions
diff --git a/sound/core/jack.c b/sound/core/jack.c index dd4a12dc09aa..077a85262c1c 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c | |||
@@ -47,7 +47,7 @@ static int snd_jack_dev_register(struct snd_device *device) | |||
47 | int err; | 47 | int err; |
48 | 48 | ||
49 | snprintf(jack->name, sizeof(jack->name), "%s %s", | 49 | snprintf(jack->name, sizeof(jack->name), "%s %s", |
50 | card->longname, jack->id); | 50 | card->shortname, jack->id); |
51 | jack->input_dev->name = jack->name; | 51 | jack->input_dev->name = jack->name; |
52 | 52 | ||
53 | /* Default to the sound card device. */ | 53 | /* Default to the sound card device. */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 11e791b965f6..c8d9178f47e5 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1947,16 +1947,13 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state) | |||
1947 | return 0; | 1947 | return 0; |
1948 | } | 1948 | } |
1949 | 1949 | ||
1950 | static int azx_resume_early(struct pci_dev *pci) | ||
1951 | { | ||
1952 | return pci_restore_state(pci); | ||
1953 | } | ||
1954 | |||
1955 | static int azx_resume(struct pci_dev *pci) | 1950 | static int azx_resume(struct pci_dev *pci) |
1956 | { | 1951 | { |
1957 | struct snd_card *card = pci_get_drvdata(pci); | 1952 | struct snd_card *card = pci_get_drvdata(pci); |
1958 | struct azx *chip = card->private_data; | 1953 | struct azx *chip = card->private_data; |
1959 | 1954 | ||
1955 | pci_set_power_state(pci, PCI_D0); | ||
1956 | pci_restore_state(pci); | ||
1960 | if (pci_enable_device(pci) < 0) { | 1957 | if (pci_enable_device(pci) < 0) { |
1961 | printk(KERN_ERR "hda-intel: pci_enable_device failed, " | 1958 | printk(KERN_ERR "hda-intel: pci_enable_device failed, " |
1962 | "disabling device\n"); | 1959 | "disabling device\n"); |
@@ -2468,7 +2465,6 @@ static struct pci_driver driver = { | |||
2468 | .remove = __devexit_p(azx_remove), | 2465 | .remove = __devexit_p(azx_remove), |
2469 | #ifdef CONFIG_PM | 2466 | #ifdef CONFIG_PM |
2470 | .suspend = azx_suspend, | 2467 | .suspend = azx_suspend, |
2471 | .resume_early = azx_resume_early, | ||
2472 | .resume = azx_resume, | 2468 | .resume = azx_resume, |
2473 | #endif | 2469 | #endif |
2474 | }; | 2470 | }; |
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index 18c7c91786bc..6c870c12a177 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
@@ -26,7 +26,7 @@ | |||
26 | * SPI 0 -> 1st PCM1796 (front) | 26 | * SPI 0 -> 1st PCM1796 (front) |
27 | * SPI 1 -> 2nd PCM1796 (surround) | 27 | * SPI 1 -> 2nd PCM1796 (surround) |
28 | * SPI 2 -> 3rd PCM1796 (center/LFE) | 28 | * SPI 2 -> 3rd PCM1796 (center/LFE) |
29 | * SPI 4 -> 4th PCM1796 (back) and EEPROM self-destruct (do not use!) | 29 | * SPI 4 -> 4th PCM1796 (back) |
30 | * | 30 | * |
31 | * GPIO 2 -> M0 of CS5381 | 31 | * GPIO 2 -> M0 of CS5381 |
32 | * GPIO 3 -> M1 of CS5381 | 32 | * GPIO 3 -> M1 of CS5381 |
@@ -207,12 +207,6 @@ static void xonar_gpio_changed(struct oxygen *chip); | |||
207 | static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec, | 207 | static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec, |
208 | u8 reg, u8 value) | 208 | u8 reg, u8 value) |
209 | { | 209 | { |
210 | /* | ||
211 | * We don't want to do writes on SPI 4 because the EEPROM, which shares | ||
212 | * the same pin, might get confused and broken. We'd better take care | ||
213 | * that the driver works with the default register values ... | ||
214 | */ | ||
215 | #if 0 | ||
216 | /* maps ALSA channel pair number to SPI output */ | 210 | /* maps ALSA channel pair number to SPI output */ |
217 | static const u8 codec_map[4] = { | 211 | static const u8 codec_map[4] = { |
218 | 0, 1, 2, 4 | 212 | 0, 1, 2, 4 |
@@ -223,7 +217,6 @@ static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec, | |||
223 | (codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | | 217 | (codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | |
224 | OXYGEN_SPI_CEN_LATCH_CLOCK_HI, | 218 | OXYGEN_SPI_CEN_LATCH_CLOCK_HI, |
225 | (reg << 8) | value); | 219 | (reg << 8) | value); |
226 | #endif | ||
227 | } | 220 | } |
228 | 221 | ||
229 | static inline void pcm1796_write_i2c(struct oxygen *chip, unsigned int codec, | 222 | static inline void pcm1796_write_i2c(struct oxygen *chip, unsigned int codec, |
@@ -757,9 +750,6 @@ static const DECLARE_TLV_DB_SCALE(cs4362a_db_scale, -12700, 100, 0); | |||
757 | 750 | ||
758 | static int xonar_d2_control_filter(struct snd_kcontrol_new *template) | 751 | static int xonar_d2_control_filter(struct snd_kcontrol_new *template) |
759 | { | 752 | { |
760 | if (!strncmp(template->name, "Master Playback ", 16)) | ||
761 | /* disable volume/mute because they would require SPI writes */ | ||
762 | return 1; | ||
763 | if (!strncmp(template->name, "CD Capture ", 11)) | 753 | if (!strncmp(template->name, "CD Capture ", 11)) |
764 | /* CD in is actually connected to the video in pin */ | 754 | /* CD in is actually connected to the video in pin */ |
765 | template->private_value ^= AC97_CD ^ AC97_VIDEO; | 755 | template->private_value ^= AC97_CD ^ AC97_VIDEO; |
@@ -850,8 +840,9 @@ static const struct oxygen_model model_xonar_d2 = { | |||
850 | .dac_volume_min = 0x0f, | 840 | .dac_volume_min = 0x0f, |
851 | .dac_volume_max = 0xff, | 841 | .dac_volume_max = 0xff, |
852 | .misc_flags = OXYGEN_MISC_MIDI, | 842 | .misc_flags = OXYGEN_MISC_MIDI, |
853 | .function_flags = OXYGEN_FUNCTION_SPI, | 843 | .function_flags = OXYGEN_FUNCTION_SPI | |
854 | .dac_i2s_format = OXYGEN_I2S_FORMAT_I2S, | 844 | OXYGEN_FUNCTION_ENABLE_SPI_4_5, |
845 | .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | ||
855 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, | 846 | .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
856 | }; | 847 | }; |
857 | 848 | ||
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 2ab83129d9b0..19e37451c216 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -2524,7 +2524,6 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform | |||
2524 | * build the rate table and bitmap flags | 2524 | * build the rate table and bitmap flags |
2525 | */ | 2525 | */ |
2526 | int r, idx; | 2526 | int r, idx; |
2527 | unsigned int nonzero_rates = 0; | ||
2528 | 2527 | ||
2529 | fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); | 2528 | fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); |
2530 | if (fp->rate_table == NULL) { | 2529 | if (fp->rate_table == NULL) { |
@@ -2532,24 +2531,27 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform | |||
2532 | return -1; | 2531 | return -1; |
2533 | } | 2532 | } |
2534 | 2533 | ||
2535 | fp->nr_rates = nr_rates; | 2534 | fp->nr_rates = 0; |
2536 | fp->rate_min = fp->rate_max = combine_triple(&fmt[8]); | 2535 | fp->rate_min = fp->rate_max = 0; |
2537 | for (r = 0, idx = offset + 1; r < nr_rates; r++, idx += 3) { | 2536 | for (r = 0, idx = offset + 1; r < nr_rates; r++, idx += 3) { |
2538 | unsigned int rate = combine_triple(&fmt[idx]); | 2537 | unsigned int rate = combine_triple(&fmt[idx]); |
2538 | if (!rate) | ||
2539 | continue; | ||
2539 | /* C-Media CM6501 mislabels its 96 kHz altsetting */ | 2540 | /* C-Media CM6501 mislabels its 96 kHz altsetting */ |
2540 | if (rate == 48000 && nr_rates == 1 && | 2541 | if (rate == 48000 && nr_rates == 1 && |
2541 | chip->usb_id == USB_ID(0x0d8c, 0x0201) && | 2542 | (chip->usb_id == USB_ID(0x0d8c, 0x0201) || |
2543 | chip->usb_id == USB_ID(0x0d8c, 0x0102)) && | ||
2542 | fp->altsetting == 5 && fp->maxpacksize == 392) | 2544 | fp->altsetting == 5 && fp->maxpacksize == 392) |
2543 | rate = 96000; | 2545 | rate = 96000; |
2544 | fp->rate_table[r] = rate; | 2546 | fp->rate_table[fp->nr_rates] = rate; |
2545 | nonzero_rates |= rate; | 2547 | if (!fp->rate_min || rate < fp->rate_min) |
2546 | if (rate < fp->rate_min) | ||
2547 | fp->rate_min = rate; | 2548 | fp->rate_min = rate; |
2548 | else if (rate > fp->rate_max) | 2549 | if (!fp->rate_max || rate > fp->rate_max) |
2549 | fp->rate_max = rate; | 2550 | fp->rate_max = rate; |
2550 | fp->rates |= snd_pcm_rate_to_rate_bit(rate); | 2551 | fp->rates |= snd_pcm_rate_to_rate_bit(rate); |
2552 | fp->nr_rates++; | ||
2551 | } | 2553 | } |
2552 | if (!nonzero_rates) { | 2554 | if (!fp->nr_rates) { |
2553 | hwc_debug("All rates were zero. Skipping format!\n"); | 2555 | hwc_debug("All rates were zero. Skipping format!\n"); |
2554 | return -1; | 2556 | return -1; |
2555 | } | 2557 | } |
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 320641ab5be7..26bad373fe65 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c | |||
@@ -1625,6 +1625,7 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi, | |||
1625 | } | 1625 | } |
1626 | 1626 | ||
1627 | ep_info.out_ep = get_endpoint(hostif, 2)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; | 1627 | ep_info.out_ep = get_endpoint(hostif, 2)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; |
1628 | ep_info.out_interval = 0; | ||
1628 | ep_info.out_cables = endpoint->out_cables & 0x5555; | 1629 | ep_info.out_cables = endpoint->out_cables & 0x5555; |
1629 | err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]); | 1630 | err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]); |
1630 | if (err < 0) | 1631 | if (err < 0) |