Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131537
b: refs/heads/master
c: e2e5a0f
h: refs/heads/master
i:
  131535: 405f397
v: v3
  • Loading branch information
Peter Oberparleiter authored and Martin Schwidefsky committed Feb 19, 2009
1 parent 922d4cc commit b54f1d6
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1342d3b8e5dbffae9d5520e2847d7d605c25266
refs/heads/master: e2e5a0f2b100a5204d27def8bbf73333d1710be2
5 changes: 4 additions & 1 deletion trunk/drivers/s390/char/sclp.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,11 @@ sclp_dispatch_evbufs(struct sccb_header *sccb)
rc = 0;
for (offset = sizeof(struct sccb_header); offset < sccb->length;
offset += evbuf->length) {
/* Search for event handler */
evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
/* Check for malformed hardware response */
if (evbuf->length == 0)
break;
/* Search for event handler */
reg = NULL;
list_for_each(l, &sclp_reg_list) {
reg = list_entry(l, struct sclp_register, list);
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/core/jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static int snd_jack_dev_register(struct snd_device *device)
int err;

snprintf(jack->name, sizeof(jack->name), "%s %s",
card->shortname, jack->id);
card->longname, jack->id);
jack->input_dev->name = jack->name;

/* Default to the sound card device. */
Expand Down
8 changes: 6 additions & 2 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1947,13 +1947,16 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t state)
return 0;
}

static int azx_resume_early(struct pci_dev *pci)
{
return pci_restore_state(pci);
}

static int azx_resume(struct pci_dev *pci)
{
struct snd_card *card = pci_get_drvdata(pci);
struct azx *chip = card->private_data;

pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
if (pci_enable_device(pci) < 0) {
printk(KERN_ERR "hda-intel: pci_enable_device failed, "
"disabling device\n");
Expand Down Expand Up @@ -2465,6 +2468,7 @@ static struct pci_driver driver = {
.remove = __devexit_p(azx_remove),
#ifdef CONFIG_PM
.suspend = azx_suspend,
.resume_early = azx_resume_early,
.resume = azx_resume,
#endif
};
Expand Down
17 changes: 13 additions & 4 deletions trunk/sound/pci/oxygen/virtuoso.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* SPI 0 -> 1st PCM1796 (front)
* SPI 1 -> 2nd PCM1796 (surround)
* SPI 2 -> 3rd PCM1796 (center/LFE)
* SPI 4 -> 4th PCM1796 (back)
* SPI 4 -> 4th PCM1796 (back) and EEPROM self-destruct (do not use!)
*
* GPIO 2 -> M0 of CS5381
* GPIO 3 -> M1 of CS5381
Expand Down Expand Up @@ -207,6 +207,12 @@ static void xonar_gpio_changed(struct oxygen *chip);
static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec,
u8 reg, u8 value)
{
/*
* We don't want to do writes on SPI 4 because the EEPROM, which shares
* the same pin, might get confused and broken. We'd better take care
* that the driver works with the default register values ...
*/
#if 0
/* maps ALSA channel pair number to SPI output */
static const u8 codec_map[4] = {
0, 1, 2, 4
Expand All @@ -217,6 +223,7 @@ static inline void pcm1796_write_spi(struct oxygen *chip, unsigned int codec,
(codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) |
OXYGEN_SPI_CEN_LATCH_CLOCK_HI,
(reg << 8) | value);
#endif
}

static inline void pcm1796_write_i2c(struct oxygen *chip, unsigned int codec,
Expand Down Expand Up @@ -750,6 +757,9 @@ static const DECLARE_TLV_DB_SCALE(cs4362a_db_scale, -12700, 100, 0);

static int xonar_d2_control_filter(struct snd_kcontrol_new *template)
{
if (!strncmp(template->name, "Master Playback ", 16))
/* disable volume/mute because they would require SPI writes */
return 1;
if (!strncmp(template->name, "CD Capture ", 11))
/* CD in is actually connected to the video in pin */
template->private_value ^= AC97_CD ^ AC97_VIDEO;
Expand Down Expand Up @@ -840,9 +850,8 @@ static const struct oxygen_model model_xonar_d2 = {
.dac_volume_min = 0x0f,
.dac_volume_max = 0xff,
.misc_flags = OXYGEN_MISC_MIDI,
.function_flags = OXYGEN_FUNCTION_SPI |
OXYGEN_FUNCTION_ENABLE_SPI_4_5,
.dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
.function_flags = OXYGEN_FUNCTION_SPI,
.dac_i2s_format = OXYGEN_I2S_FORMAT_I2S,
.adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST,
};

Expand Down
20 changes: 9 additions & 11 deletions trunk/sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2524,34 +2524,32 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform
* build the rate table and bitmap flags
*/
int r, idx;
unsigned int nonzero_rates = 0;

fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL);
if (fp->rate_table == NULL) {
snd_printk(KERN_ERR "cannot malloc\n");
return -1;
}

fp->nr_rates = 0;
fp->rate_min = fp->rate_max = 0;
fp->nr_rates = nr_rates;
fp->rate_min = fp->rate_max = combine_triple(&fmt[8]);
for (r = 0, idx = offset + 1; r < nr_rates; r++, idx += 3) {
unsigned int rate = combine_triple(&fmt[idx]);
if (!rate)
continue;
/* C-Media CM6501 mislabels its 96 kHz altsetting */
if (rate == 48000 && nr_rates == 1 &&
(chip->usb_id == USB_ID(0x0d8c, 0x0201) ||
chip->usb_id == USB_ID(0x0d8c, 0x0102)) &&
chip->usb_id == USB_ID(0x0d8c, 0x0201) &&
fp->altsetting == 5 && fp->maxpacksize == 392)
rate = 96000;
fp->rate_table[fp->nr_rates] = rate;
if (!fp->rate_min || rate < fp->rate_min)
fp->rate_table[r] = rate;
nonzero_rates |= rate;
if (rate < fp->rate_min)
fp->rate_min = rate;
if (!fp->rate_max || rate > fp->rate_max)
else if (rate > fp->rate_max)
fp->rate_max = rate;
fp->rates |= snd_pcm_rate_to_rate_bit(rate);
fp->nr_rates++;
}
if (!fp->nr_rates) {
if (!nonzero_rates) {
hwc_debug("All rates were zero. Skipping format!\n");
return -1;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/usb/usbmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,6 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi,
}

ep_info.out_ep = get_endpoint(hostif, 2)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
ep_info.out_interval = 0;
ep_info.out_cables = endpoint->out_cables & 0x5555;
err = snd_usbmidi_out_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]);
if (err < 0)
Expand Down

0 comments on commit b54f1d6

Please sign in to comment.