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: (26 commits)
  ALSA: hdmi - show debug message on changing audio infoframe
  ALSA: hdmi - merge common code for intelhdmi and nvhdmi
  ALSA: hda - Add ASRock mobo to MSI blacklist
  ALSA: hda: uninitialized variable fix
  ALSA: hda: Use LPIB for a Biostar Microtech board
  ALSA: usb/audio.h: Fix field order
  ALSA: fix jazz16 compile (udelay)
  ALSA: hda: Use LPIB for Dell Latitude 131L
  ALSA: hda - Build hda_eld into snd-hda-codec module
  ALSA: hda - Support NVIDIA MCP89 and GT21x hdmi audio
  ALSA: hda - Support max codecs to 8 for nvidia hda controller
  ALSA: riptide: clean up while loop
  ALSA: usbaudio - remove debug "SAMPLE BYTES" printk line
  ALSA: timer - pass real event in snd_timer_notify1() to instance callback
  ALSA: oxygen: change || to &&
  ALSA: opti92x: use PnP data to select Master Control port
  ASoC: fix ak4104 register array access
  ASoC: soc_pcm_open: Add missing bailout tag
  ALSA: usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam
  ALSA: ua101: removing debugging code
  ...
  • Loading branch information
Linus Torvalds committed Mar 8, 2010
2 parents 3c443cb + a3087ae commit 56b7892
Show file tree
Hide file tree
Showing 28 changed files with 1,284 additions and 1,125 deletions.
2 changes: 1 addition & 1 deletion Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module snd-ua101
----------------

Module for the Edirol UA-101 audio/MIDI interface.
Module for the Edirol UA-101/UA-1000 audio/MIDI interfaces.

This module supports multiple devices, autoprobe and hotplugging.

Expand Down
2 changes: 1 addition & 1 deletion include/linux/usb/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ struct uac_format_type_i_ext_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bDescriptorSubtype;
__u8 bSubslotSize;
__u8 bFormatType;
__u8 bSubslotSize;
__u8 bBitResolution;
__u8 bHeaderLength;
__u8 bControlSize;
Expand Down
2 changes: 1 addition & 1 deletion include/sound/asound.h
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ struct snd_rawmidi_status {
* Timer section - /dev/snd/timer
*/

#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 5)
#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6)

enum {
SNDRV_TIMER_CLASS_NONE = -1,
Expand Down
2 changes: 1 addition & 1 deletion sound/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
event == SNDRV_TIMER_EVENT_CONTINUE)
resolution = snd_timer_resolution(ti);
if (ti->ccallback)
ti->ccallback(ti, SNDRV_TIMER_EVENT_START, &tstamp, resolution);
ti->ccallback(ti, event, &tstamp, resolution);
if (ti->flags & SNDRV_TIMER_IFLG_SLAVE)
return;
timer = ti->timer;
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/opti9xx/miro.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ static int __devinit snd_card_miro_pnp(struct snd_miro *chip,

err = pnp_activate_dev(devmc);
if (err < 0) {
snd_printk(KERN_ERR "OPL syntg pnp configure failure: %d\n",
snd_printk(KERN_ERR "MC pnp configure failure: %d\n",
err);
return err;
}
Expand Down
120 changes: 78 additions & 42 deletions sound/isa/opti9xx/opti92x-ad1848.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,8 @@ struct snd_opti9xx {

spinlock_t lock;

long wss_base;
int irq;

#ifdef CONFIG_PNP
struct pnp_dev *dev;
struct pnp_dev *devmpu;
#endif /* CONFIG_PNP */
};

static int snd_opti9xx_pnp_is_probed;
Expand All @@ -159,12 +155,17 @@ static int snd_opti9xx_pnp_is_probed;
static struct pnp_card_device_id snd_opti9xx_pnpids[] = {
#ifndef OPTi93X
/* OPTi 82C924 */
{ .id = "OPT0924", .devs = { { "OPT0000" }, { "OPT0002" } }, .driver_data = 0x0924 },
{ .id = "OPT0924",
.devs = { { "OPT0000" }, { "OPT0002" }, { "OPT0005" } },
.driver_data = 0x0924 },
/* OPTi 82C925 */
{ .id = "OPT0925", .devs = { { "OPT9250" }, { "OPT0002" } }, .driver_data = 0x0925 },
{ .id = "OPT0925",
.devs = { { "OPT9250" }, { "OPT0002" }, { "OPT0005" } },
.driver_data = 0x0925 },
#else
/* OPTi 82C931/3 */
{ .id = "OPT0931", .devs = { { "OPT9310" }, { "OPT0002" } }, .driver_data = 0x0931 },
{ .id = "OPT0931", .devs = { { "OPT9310" }, { "OPT0002" } },
.driver_data = 0x0931 },
#endif /* OPTi93X */
{ .id = "" }
};
Expand Down Expand Up @@ -207,24 +208,34 @@ static int __devinit snd_opti9xx_init(struct snd_opti9xx *chip,
chip->hardware = hardware;
strcpy(chip->name, snd_opti9xx_names[hardware]);

chip->mc_base_size = opti9xx_mc_size[hardware];

spin_lock_init(&chip->lock);

chip->irq = -1;

#ifndef OPTi93X
#ifdef CONFIG_PNP
if (isapnp && chip->mc_base)
/* PnP resource gives the least 10 bits */
chip->mc_base |= 0xc00;
#endif /* CONFIG_PNP */
else {
chip->mc_base = 0xf8c;
chip->mc_base_size = opti9xx_mc_size[hardware];
}
#else
chip->mc_base_size = opti9xx_mc_size[hardware];
#endif

switch (hardware) {
#ifndef OPTi93X
case OPTi9XX_HW_82C928:
case OPTi9XX_HW_82C929:
chip->mc_base = 0xf8c;
chip->password = (hardware == OPTi9XX_HW_82C928) ? 0xe2 : 0xe3;
chip->pwd_reg = 3;
break;

case OPTi9XX_HW_82C924:
case OPTi9XX_HW_82C925:
chip->mc_base = 0xf8c;
chip->password = 0xe5;
chip->pwd_reg = 3;
break;
Expand Down Expand Up @@ -292,7 +303,7 @@ static unsigned char snd_opti9xx_read(struct snd_opti9xx *chip,
spin_unlock_irqrestore(&chip->lock, flags);
return retval;
}

static void snd_opti9xx_write(struct snd_opti9xx *chip, unsigned char reg,
unsigned char value)
{
Expand Down Expand Up @@ -341,7 +352,7 @@ static void snd_opti9xx_write(struct snd_opti9xx *chip, unsigned char reg,


static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip,
long wss_base,
long port,
int irq, int dma1, int dma2,
long mpu_port, int mpu_irq)
{
Expand All @@ -354,16 +365,23 @@ static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip,
switch (chip->hardware) {
#ifndef OPTi93X
case OPTi9XX_HW_82C924:
/* opti 929 mode (?), OPL3 clock output, audio enable */
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(4), 0xf0, 0xfc);
/* enable wave audio */
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(6), 0x02, 0x02);

case OPTi9XX_HW_82C925:
/* enable WSS mode */
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(1), 0x80, 0x80);
/* OPL3 FM synthesis */
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(2), 0x00, 0x20);
/* disable Sound Blaster IRQ and DMA */
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(3), 0xf0, 0xff);
#ifdef CS4231
/* cs4231/4248 fix enabled */
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(5), 0x02, 0x02);
#else
/* cs4231/4248 fix disabled */
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(5), 0x00, 0x02);
#endif /* CS4231 */
break;
Expand Down Expand Up @@ -411,21 +429,26 @@ static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip,
return -EINVAL;
}

switch (wss_base) {
case 0x530:
/* PnP resource says it decodes only 10 bits of address */
switch (port & 0x3ff) {
case 0x130:
chip->wss_base = 0x530;
wss_base_bits = 0x00;
break;
case 0x604:
case 0x204:
chip->wss_base = 0x604;
wss_base_bits = 0x03;
break;
case 0xe80:
case 0x280:
chip->wss_base = 0xe80;
wss_base_bits = 0x01;
break;
case 0xf40:
case 0x340:
chip->wss_base = 0xf40;
wss_base_bits = 0x02;
break;
default:
snd_printk(KERN_WARNING "WSS port 0x%lx not valid\n", wss_base);
snd_printk(KERN_WARNING "WSS port 0x%lx not valid\n", port);
goto __skip_base;
}
snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(1), wss_base_bits << 4, 0x30);
Expand Down Expand Up @@ -487,7 +510,7 @@ static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip,
#endif /* CS4231 || OPTi93X */

#ifndef OPTi93X
outb(irq_bits << 3 | dma_bits, wss_base);
outb(irq_bits << 3 | dma_bits, chip->wss_base);
#else /* OPTi93X */
snd_opti9xx_write(chip, OPTi9XX_MC_REG(3), (irq_bits << 3 | dma_bits));
#endif /* OPTi93X */
Expand Down Expand Up @@ -729,15 +752,15 @@ static int __devinit snd_card_opti9xx_pnp(struct snd_opti9xx *chip,
{
struct pnp_dev *pdev;
int err;
struct pnp_dev *devmpu;
#ifndef OPTi93X
struct pnp_dev *devmc;
#endif

chip->dev = pnp_request_card_device(card, pid->devs[0].id, NULL);
if (chip->dev == NULL)
pdev = pnp_request_card_device(card, pid->devs[0].id, NULL);
if (pdev == NULL)
return -EBUSY;

chip->devmpu = pnp_request_card_device(card, pid->devs[1].id, NULL);

pdev = chip->dev;

err = pnp_activate_dev(pdev);
if (err < 0) {
snd_printk(KERN_ERR "AUDIO pnp configure failure: %d\n", err);
Expand All @@ -750,26 +773,41 @@ static int __devinit snd_card_opti9xx_pnp(struct snd_opti9xx *chip,
chip->mc_indir_index = pnp_port_start(pdev, 3) + 2;
chip->mc_indir_size = pnp_port_len(pdev, 3) - 2;
#else
if (pid->driver_data != 0x0924)
port = pnp_port_start(pdev, 1);
devmc = pnp_request_card_device(card, pid->devs[2].id, NULL);
if (devmc == NULL)
return -EBUSY;

err = pnp_activate_dev(devmc);
if (err < 0) {
snd_printk(KERN_ERR "MC pnp configure failure: %d\n", err);
return err;
}

port = pnp_port_start(pdev, 1);
fm_port = pnp_port_start(pdev, 2) + 8;
/*
* The MC(0) is never accessed and card does not
* include it in the PnP resource range. OPTI93x include it.
*/
chip->mc_base = pnp_port_start(devmc, 0) - 1;
chip->mc_base_size = pnp_port_len(devmc, 0) + 1;
#endif /* OPTi93X */
irq = pnp_irq(pdev, 0);
dma1 = pnp_dma(pdev, 0);
#if defined(CS4231) || defined(OPTi93X)
dma2 = pnp_dma(pdev, 1);
#endif /* CS4231 || OPTi93X */

pdev = chip->devmpu;
if (pdev && mpu_port > 0) {
err = pnp_activate_dev(pdev);
devmpu = pnp_request_card_device(card, pid->devs[1].id, NULL);

if (devmpu && mpu_port > 0) {
err = pnp_activate_dev(devmpu);
if (err < 0) {
snd_printk(KERN_ERR "AUDIO pnp configure failure\n");
snd_printk(KERN_ERR "MPU401 pnp configure failure\n");
mpu_port = -1;
chip->devmpu = NULL;
} else {
mpu_port = pnp_port_start(pdev, 0);
mpu_irq = pnp_irq(pdev, 0);
mpu_port = pnp_port_start(devmpu, 0);
mpu_irq = pnp_irq(devmpu, 0);
}
}
return pid->driver_data;
Expand Down Expand Up @@ -824,7 +862,7 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
if (error)
return error;

error = snd_wss_create(card, port + 4, -1, irq, dma1, xdma2,
error = snd_wss_create(card, chip->wss_base + 4, -1, irq, dma1, xdma2,
#ifdef OPTi93X
WSS_HW_OPTI93X, WSS_HWSHARE_IRQ,
#else
Expand Down Expand Up @@ -865,10 +903,11 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
sprintf(card->shortname, "OPTi %s", card->driver);
#if defined(CS4231) || defined(OPTi93X)
sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d&%d",
card->shortname, pcm->name, port + 4, irq, dma1, xdma2);
card->shortname, pcm->name,
chip->wss_base + 4, irq, dma1, xdma2);
#else
sprintf(card->longname, "%s, %s at 0x%lx, irq %d, dma %d",
card->shortname, pcm->name, port + 4, irq, dma1);
card->shortname, pcm->name, chip->wss_base + 4, irq, dma1);
#endif /* CS4231 || OPTi93X */

if (mpu_port <= 0 || mpu_port == SNDRV_AUTO_PORT)
Expand Down Expand Up @@ -1062,9 +1101,6 @@ static int __devinit snd_opti9xx_pnp_probe(struct pnp_card_link *pcard,
snd_card_free(card);
return error;
}
if (hw <= OPTi9XX_HW_82C930)
chip->mc_base -= 0x80;

error = snd_opti9xx_read_check(chip);
if (error) {
snd_printk(KERN_ERR "OPTI chip not found\n");
Expand Down
1 change: 1 addition & 0 deletions sound/isa/sb/jazz16.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <asm/dma.h>
#include <linux/isa.h>
#include <sound/core.h>
Expand Down
2 changes: 1 addition & 1 deletion sound/oss/coproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

/*
* Coprocessor access types
* Coprocessor access types
*/
#define COPR_CUSTOM 0x0001 /* Custom applications */
#define COPR_MIDI 0x0002 /* MIDI (MPU-401) emulation */
Expand Down
5 changes: 2 additions & 3 deletions sound/oss/v_midi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ typedef struct vmidi_devc {
int dev;

/* State variables */
int opened;
int opened;
spinlock_t lock;

/* MIDI fields */
int my_mididev;
int pair_mididev;
int input_opened;
int intr_active;
void (*midi_input_intr) (int dev, unsigned char data);
} vmidi_devc;

2 changes: 1 addition & 1 deletion sound/pci/hda/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ config SND_HDA_CODEC_INTELHDMI

config SND_HDA_ELD
def_bool y
depends on SND_HDA_CODEC_INTELHDMI
depends on SND_HDA_CODEC_INTELHDMI || SND_HDA_CODEC_NVHDMI

config SND_HDA_CODEC_CIRRUS
bool "Build Cirrus Logic codec support"
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/hda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ snd-hda-intel-objs := hda_intel.o
snd-hda-codec-y := hda_codec.o
snd-hda-codec-$(CONFIG_SND_HDA_GENERIC) += hda_generic.o
snd-hda-codec-$(CONFIG_PROC_FS) += hda_proc.o
# snd-hda-codec-$(CONFIG_SND_HDA_ELD) += hda_eld.o
snd-hda-codec-$(CONFIG_SND_HDA_ELD) += hda_eld.o
snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o

Expand All @@ -18,7 +18,7 @@ snd-hda-codec-ca0110-objs := patch_ca0110.o
snd-hda-codec-conexant-objs := patch_conexant.o
snd-hda-codec-via-objs := patch_via.o
snd-hda-codec-nvhdmi-objs := patch_nvhdmi.o
snd-hda-codec-intelhdmi-objs := patch_intelhdmi.o hda_eld.o
snd-hda-codec-intelhdmi-objs := patch_intelhdmi.o

# common driver
obj-$(CONFIG_SND_HDA_INTEL) := snd-hda-codec.o
Expand Down
Loading

0 comments on commit 56b7892

Please sign in to comment.