Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda: make a STAC_DELL_EQ option
  ALSA: emu10k1 - Add more invert_shared_spdif flag to Audigy models
  ALSA: hda - Add a quirk for another Acer Aspire (1025:0090)
  ALSA: remove direct access of dev->bus_id in sound/isa/*
  sound: struct device - replace bus_id with dev_name(), dev_set_name()
  ALSA: Fix PIT lockup on some chipsets when using the PC-Speaker
  ALSA: rawmidi - Add open check in rawmidi callbacks
  ALSA: hda - Add digital-mic for ALC269 auto-probe mode
  ALSA: hda - Disable broken mic auto-muting in Realtek codes
  • Loading branch information
torvalds committed Nov 3, 2008
2 parents c8126cc + 7aeb6d7 commit 20ebc00
Show file tree
Hide file tree
Showing 16 changed files with 89 additions and 60 deletions.
2 changes: 1 addition & 1 deletion sound/aoa/soundbus/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int soundbus_add_one(struct soundbus_dev *dev)
return -EINVAL;
}

snprintf(dev->ofdev.dev.bus_id, BUS_ID_SIZE, "soundbus:%x", ++devcount);
dev_set_name(&dev->ofdev.dev, "soundbus:%x", ++devcount);
dev->ofdev.dev.bus = &soundbus_bus_type;
return of_device_register(&dev->ofdev);
}
Expand Down
8 changes: 8 additions & 0 deletions sound/core/rawmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ static int snd_rawmidi_runtime_free(struct snd_rawmidi_substream *substream)

static inline void snd_rawmidi_output_trigger(struct snd_rawmidi_substream *substream,int up)
{
if (!substream->opened)
return;
if (up) {
tasklet_hi_schedule(&substream->runtime->tasklet);
} else {
Expand All @@ -158,6 +160,8 @@ static inline void snd_rawmidi_output_trigger(struct snd_rawmidi_substream *subs

static void snd_rawmidi_input_trigger(struct snd_rawmidi_substream *substream, int up)
{
if (!substream->opened)
return;
substream->ops->trigger(substream, up);
if (!up && substream->runtime->event)
tasklet_kill(&substream->runtime->tasklet);
Expand Down Expand Up @@ -857,6 +861,8 @@ int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
int result = 0, count1;
struct snd_rawmidi_runtime *runtime = substream->runtime;

if (!substream->opened)
return -EBADFD;
if (runtime->buffer == NULL) {
snd_printd("snd_rawmidi_receive: input is not active!!!\n");
return -EINVAL;
Expand Down Expand Up @@ -1126,6 +1132,8 @@ int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count)
int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream,
unsigned char *buffer, int count)
{
if (!substream->opened)
return -EBADFD;
count = snd_rawmidi_transmit_peek(substream, buffer, count);
if (count < 0)
return count;
Expand Down
4 changes: 2 additions & 2 deletions sound/drivers/ml403-ac97cr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
/* get irq */
irq = platform_get_irq(pfdev, 0);
if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
pfdev->dev.bus_id, (void *)ml403_ac97cr)) {
dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
"unable to grab IRQ %d\n",
irq);
Expand All @@ -1166,7 +1166,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
ml403_ac97cr->irq);
irq = platform_get_irq(pfdev, 1);
if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
pfdev->dev.bus_id, (void *)ml403_ac97cr)) {
dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
"unable to grab IRQ %d\n",
irq);
Expand Down
4 changes: 2 additions & 2 deletions sound/drivers/pcsp/pcsp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ static void pcspkr_do_sound(unsigned int count)
spin_lock_irqsave(&i8253_lock, flags);

if (count) {
/* enable counter 2 */
outb_p(inb_p(0x61) | 3, 0x61);
/* set command for counter 2, 2 byte write */
outb_p(0xB6, 0x43);
/* select desired HZ */
outb_p(count & 0xff, 0x42);
outb((count >> 8) & 0xff, 0x42);
/* enable counter 2 */
outb_p(inb_p(0x61) | 3, 0x61);
} else {
/* disable counter 2 */
outb(inb_p(0x61) & 0xFC, 0x61);
Expand Down
6 changes: 3 additions & 3 deletions sound/isa/ad1848/ad1848.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ static int __devinit snd_ad1848_match(struct device *dev, unsigned int n)
return 0;

if (port[n] == SNDRV_AUTO_PORT) {
snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
dev_err(dev, "please specify port\n");
return 0;
}
if (irq[n] == SNDRV_AUTO_IRQ) {
snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id);
dev_err(dev, "please specify irq\n");
return 0;
}
if (dma1[n] == SNDRV_AUTO_DMA) {
snd_printk(KERN_ERR "%s: please specify dma1\n", dev->bus_id);
dev_err(dev, "please specify dma1\n");
return 0;
}
return 1;
Expand Down
12 changes: 6 additions & 6 deletions sound/isa/adlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static int __devinit snd_adlib_match(struct device *dev, unsigned int n)
return 0;

if (port[n] == SNDRV_AUTO_PORT) {
snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
dev_err(dev, "please specify port\n");
return 0;
}
return 1;
Expand All @@ -55,13 +55,13 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)

card = snd_card_new(index[n], id[n], THIS_MODULE, 0);
if (!card) {
snd_printk(KERN_ERR "%s: could not create card\n", dev->bus_id);
dev_err(dev, "could not create card\n");
return -EINVAL;
}

card->private_data = request_region(port[n], 4, CRD_NAME);
if (!card->private_data) {
snd_printk(KERN_ERR "%s: could not grab ports\n", dev->bus_id);
dev_err(dev, "could not grab ports\n");
error = -EBUSY;
goto out;
}
Expand All @@ -73,21 +73,21 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)

error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3);
if (error < 0) {
snd_printk(KERN_ERR "%s: could not create OPL\n", dev->bus_id);
dev_err(dev, "could not create OPL\n");
goto out;
}

error = snd_opl3_hwdep_new(opl3, 0, 0, NULL);
if (error < 0) {
snd_printk(KERN_ERR "%s: could not create FM\n", dev->bus_id);
dev_err(dev, "could not create FM\n");
goto out;
}

snd_card_set_dev(card, dev);

error = snd_card_register(card);
if (error < 0) {
snd_printk(KERN_ERR "%s: could not register card\n", dev->bus_id);
dev_err(dev, "could not register card\n");
goto out;
}

Expand Down
8 changes: 4 additions & 4 deletions sound/isa/cs423x/cs4231.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ static int __devinit snd_cs4231_match(struct device *dev, unsigned int n)
return 0;

if (port[n] == SNDRV_AUTO_PORT) {
snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
dev_err(dev, "please specify port\n");
return 0;
}
if (irq[n] == SNDRV_AUTO_IRQ) {
snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id);
dev_err(dev, "please specify irq\n");
return 0;
}
if (dma1[n] == SNDRV_AUTO_DMA) {
snd_printk(KERN_ERR "%s: please specify dma1\n", dev->bus_id);
dev_err(dev, "please specify dma1\n");
return 0;
}
return 1;
Expand Down Expand Up @@ -133,7 +133,7 @@ static int __devinit snd_cs4231_probe(struct device *dev, unsigned int n)
mpu_port[n], 0, mpu_irq[n],
mpu_irq[n] >= 0 ? IRQF_DISABLED : 0,
NULL) < 0)
printk(KERN_WARNING "%s: MPU401 not detected\n", dev->bus_id);
dev_warn(dev, "MPU401 not detected\n");
}

snd_card_set_dev(card, dev);
Expand Down
8 changes: 4 additions & 4 deletions sound/isa/cs423x/cs4236.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,19 +488,19 @@ static int __devinit snd_cs423x_isa_match(struct device *pdev,
return 0;

if (port[dev] == SNDRV_AUTO_PORT) {
snd_printk(KERN_ERR "%s: please specify port\n", pdev->bus_id);
dev_err(pdev, "please specify port\n");
return 0;
}
if (cport[dev] == SNDRV_AUTO_PORT) {
snd_printk(KERN_ERR "%s: please specify cport\n", pdev->bus_id);
dev_err(pdev, "please specify cport\n");
return 0;
}
if (irq[dev] == SNDRV_AUTO_IRQ) {
snd_printk(KERN_ERR "%s: please specify irq\n", pdev->bus_id);
dev_err(pdev, "please specify irq\n");
return 0;
}
if (dma1[dev] == SNDRV_AUTO_DMA) {
snd_printk(KERN_ERR "%s: please specify dma1\n", pdev->bus_id);
dev_err(pdev, "please specify dma1\n");
return 0;
}
return 1;
Expand Down
9 changes: 3 additions & 6 deletions sound/isa/es1688/es1688.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,14 @@ static int __devinit snd_es1688_legacy_create(struct snd_card *card,
if (irq[n] == SNDRV_AUTO_IRQ) {
irq[n] = snd_legacy_find_free_irq(possible_irqs);
if (irq[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free IRQ\n",
dev->bus_id);
dev_err(dev, "unable to find a free IRQ\n");
return -EBUSY;
}
}
if (dma8[n] == SNDRV_AUTO_DMA) {
dma8[n] = snd_legacy_find_free_dma(possible_dmas);
if (dma8[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free DMA\n",
dev->bus_id);
dev_err(dev, "unable to find a free DMA\n");
return -EBUSY;
}
}
Expand Down Expand Up @@ -147,8 +145,7 @@ static int __devinit snd_es1688_probe(struct device *dev, unsigned int n)

if (snd_opl3_create(card, chip->port, chip->port + 2,
OPL3_HW_OPL3, 0, &opl3) < 0)
printk(KERN_WARNING "%s: opl3 not detected at 0x%lx\n",
dev->bus_id, chip->port);
dev_warn(dev, "opl3 not detected at 0x%lx\n", chip->port);
else {
error = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
if (error < 0)
Expand Down
13 changes: 5 additions & 8 deletions sound/isa/gus/gusclassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,21 @@ static int __devinit snd_gusclassic_create(struct snd_card *card,
if (irq[n] == SNDRV_AUTO_IRQ) {
irq[n] = snd_legacy_find_free_irq(possible_irqs);
if (irq[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free IRQ\n",
dev->bus_id);
dev_err(dev, "unable to find a free IRQ\n");
return -EBUSY;
}
}
if (dma1[n] == SNDRV_AUTO_DMA) {
dma1[n] = snd_legacy_find_free_dma(possible_dmas);
if (dma1[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free DMA1\n",
dev->bus_id);
dev_err(dev, "unable to find a free DMA1\n");
return -EBUSY;
}
}
if (dma2[n] == SNDRV_AUTO_DMA) {
dma2[n] = snd_legacy_find_free_dma(possible_dmas);
if (dma2[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free DMA2\n",
dev->bus_id);
dev_err(dev, "unable to find a free DMA2\n");
return -EBUSY;
}
}
Expand Down Expand Up @@ -174,8 +171,8 @@ static int __devinit snd_gusclassic_probe(struct device *dev, unsigned int n)

error = -ENODEV;
if (gus->max_flag || gus->ess_flag) {
snd_printk(KERN_ERR "%s: GUS Classic or ACE soundcard was "
"not detected at 0x%lx\n", dev->bus_id, gus->gf1.port);
dev_err(dev, "GUS Classic or ACE soundcard was "
"not detected at 0x%lx\n", gus->gf1.port);
goto out;
}

Expand Down
19 changes: 7 additions & 12 deletions sound/isa/gus/gusextreme.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,14 @@ static int __devinit snd_gusextreme_es1688_create(struct snd_card *card,
if (irq[n] == SNDRV_AUTO_IRQ) {
irq[n] = snd_legacy_find_free_irq(possible_irqs);
if (irq[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free IRQ "
"for ES1688\n", dev->bus_id);
dev_err(dev, "unable to find a free IRQ for ES1688\n");
return -EBUSY;
}
}
if (dma8[n] == SNDRV_AUTO_DMA) {
dma8[n] = snd_legacy_find_free_dma(possible_dmas);
if (dma8[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free DMA "
"for ES1688\n", dev->bus_id);
dev_err(dev, "unable to find a free DMA for ES1688\n");
return -EBUSY;
}
}
Expand Down Expand Up @@ -143,16 +141,14 @@ static int __devinit snd_gusextreme_gus_card_create(struct snd_card *card,
if (gf1_irq[n] == SNDRV_AUTO_IRQ) {
gf1_irq[n] = snd_legacy_find_free_irq(possible_irqs);
if (gf1_irq[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free IRQ "
"for GF1\n", dev->bus_id);
dev_err(dev, "unable to find a free IRQ for GF1\n");
return -EBUSY;
}
}
if (dma1[n] == SNDRV_AUTO_DMA) {
dma1[n] = snd_legacy_find_free_dma(possible_dmas);
if (dma1[n] < 0) {
snd_printk(KERN_ERR "%s: unable to find a free DMA "
"for GF1\n", dev->bus_id);
dev_err(dev, "unable to find a free DMA for GF1\n");
return -EBUSY;
}
}
Expand Down Expand Up @@ -278,8 +274,8 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n)

error = -ENODEV;
if (!gus->ess_flag) {
snd_printk(KERN_ERR "%s: GUS Extreme soundcard was not "
"detected at 0x%lx\n", dev->bus_id, gus->gf1.port);
dev_err(dev, "GUS Extreme soundcard was not "
"detected at 0x%lx\n", gus->gf1.port);
goto out;
}
gus->codec_flag = 1;
Expand Down Expand Up @@ -310,8 +306,7 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n)

if (snd_opl3_create(card, es1688->port, es1688->port + 2,
OPL3_HW_OPL3, 0, &opl3) < 0)
printk(KERN_ERR "%s: opl3 not detected at 0x%lx\n",
dev->bus_id, es1688->port);
dev_warn(dev, "opl3 not detected at 0x%lx\n", es1688->port);
else {
error = snd_opl3_hwdep_new(opl3, 0, 2, NULL);
if (error < 0)
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/sb/sb8.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ static int __devinit snd_sb8_match(struct device *pdev, unsigned int dev)
if (!enable[dev])
return 0;
if (irq[dev] == SNDRV_AUTO_IRQ) {
snd_printk(KERN_ERR "%s: please specify irq\n", pdev->bus_id);
dev_err(pdev, "please specify irq\n");
return 0;
}
if (dma8[dev] == SNDRV_AUTO_DMA) {
snd_printk(KERN_ERR "%s: please specify dma8\n", pdev->bus_id);
dev_err(pdev, "please specify dma8\n");
return 0;
}
return 1;
Expand Down
3 changes: 3 additions & 0 deletions sound/pci/emu10k1/emu10k1_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {
.ca0151_chip = 1,
.spk71 = 1,
.spdif_bug = 1,
.invert_shared_spdif = 1, /* digital/analog switch swapped */
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102,
.driver = "Audigy2", .name = "Audigy 2 ZS [SB0350]",
Expand All @@ -1473,6 +1474,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {
.ca0151_chip = 1,
.spk71 = 1,
.spdif_bug = 1,
.invert_shared_spdif = 1, /* digital/analog switch swapped */
.ac97_chip = 1} ,
{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102,
.driver = "Audigy2", .name = "Audigy 2 ZS [2001]",
Expand All @@ -1482,6 +1484,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {
.ca0151_chip = 1,
.spk71 = 1,
.spdif_bug = 1,
.invert_shared_spdif = 1, /* digital/analog switch swapped */
.ac97_chip = 1} ,
/* Audigy 2 */
/* Tested by [email protected] 3rd July 2005 */
Expand Down
Loading

0 comments on commit 20ebc00

Please sign in to comment.