Commit b17bfca5 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa

* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
  [ALSA] usbaudio - Coping with short replies in usbmixer
  [ALSA] Include quirks from Ubuntu Dapper/Edgy/Feisty
  [ALSA] Fix probe of non-PnP ISA devices
  [ALSA] version 1.0.14rc4
  [ALSA] hda-codec - Fix ALC882/861VD codec support on some laptops
  [ALSA] ASoC AC97 device reg bugfix
  [ALSA] ASoC AC97 static GPL symbol fix
  [ALSA] hda-codec - Make the mixer capability check more robust
  [ALSA] usb-audio: another Logitech QuickCam ID
parents 36dbe4d6 a04395ea
......@@ -22,7 +22,7 @@
#include <sound/control.h>
#include <sound/ac97_codec.h>
#define SND_SOC_VERSION "0.13.0"
#define SND_SOC_VERSION "0.13.1"
/*
* Convenience kcontrol builders
......@@ -83,6 +83,7 @@
#define SND_SOC_DAI_AC97 0x1
#define SND_SOC_DAI_I2S 0x2
#define SND_SOC_DAI_PCM 0x4
#define SND_SOC_DAI_AC97_BUS 0x8 /* for custom i.e. non ac97_codec.c */
/*
* DAI hardware audio formats
......@@ -278,6 +279,7 @@ struct snd_soc_cpu_ops {
struct snd_soc_codec_dai {
char *name;
int id;
unsigned char type;
/* DAI capabilities */
struct snd_soc_pcm_stream playback;
......
/* include/version.h. Generated by alsa/ksync script. */
#define CONFIG_SND_VERSION "1.0.14rc4"
#define CONFIG_SND_DATE " (Wed May 09 09:51:39 2007 UTC)"
#define CONFIG_SND_DATE " (Wed May 16 09:45:46 2007 UTC)"
......@@ -109,6 +109,7 @@ module_param_array(wssdma, int, NULL, 0444);
MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver.");
#ifdef CONFIG_PNP
static int isa_registered;
static int pnp_registered;
#endif
......@@ -686,14 +687,18 @@ static int __init alsa_card_cmi8330_init(void)
int err;
err = isa_register_driver(&snd_cmi8330_driver, SNDRV_CARDS);
if (err < 0)
return err;
#ifdef CONFIG_PNP
if (!err)
isa_registered = 1;
err = pnp_register_card_driver(&cmi8330_pnpc_driver);
if (!err)
pnp_registered = 1;
if (isa_registered)
err = 0;
#endif
return 0;
return err;
}
static void __exit alsa_card_cmi8330_exit(void)
......@@ -701,8 +706,10 @@ static void __exit alsa_card_cmi8330_exit(void)
#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&cmi8330_pnpc_driver);
if (isa_registered)
#endif
isa_unregister_driver(&snd_cmi8330_driver);
isa_unregister_driver(&snd_cmi8330_driver);
}
module_init(alsa_card_cmi8330_init)
......
......@@ -127,6 +127,7 @@ module_param_array(dma2, int, NULL, 0444);
MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");
#ifdef CONFIG_PNP
static int isa_registered;
static int pnpc_registered;
#ifdef CS4232
static int pnp_registered;
......@@ -770,9 +771,9 @@ static int __init alsa_card_cs423x_init(void)
int err;
err = isa_register_driver(&cs423x_isa_driver, SNDRV_CARDS);
if (err < 0)
return err;
#ifdef CONFIG_PNP
if (!err)
isa_registered = 1;
#ifdef CS4232
err = pnp_register_driver(&cs4232_pnp_driver);
if (!err)
......@@ -781,8 +782,14 @@ static int __init alsa_card_cs423x_init(void)
err = pnp_register_card_driver(&cs423x_pnpc_driver);
if (!err)
pnpc_registered = 1;
#endif /* CONFIG_PNP */
return 0;
#ifdef CS4232
if (pnp_registered)
err = 0;
#endif
if (isa_registered)
err = 0;
#endif
return err;
}
static void __exit alsa_card_cs423x_exit(void)
......@@ -794,8 +801,9 @@ static void __exit alsa_card_cs423x_exit(void)
if (pnp_registered)
pnp_unregister_driver(&cs4232_pnp_driver);
#endif
#endif /* CONFIG_PNP */
isa_unregister_driver(&cs423x_isa_driver);
if (isa_registered)
#endif
isa_unregister_driver(&cs423x_isa_driver);
}
module_init(alsa_card_cs423x_init)
......
......@@ -2036,7 +2036,9 @@ module_param_array(dma2, int, NULL, 0444);
MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver.");
#ifdef CONFIG_PNP
static int pnp_registered, pnpc_registered;
static int isa_registered;
static int pnp_registered;
static int pnpc_registered;
static struct pnp_device_id snd_audiodrive_pnpbiosids[] = {
{ .id = "ESS1869" },
......@@ -2466,18 +2468,22 @@ static int __init alsa_card_es18xx_init(void)
int err;
err = isa_register_driver(&snd_es18xx_isa_driver, SNDRV_CARDS);
if (err < 0)
return err;
#ifdef CONFIG_PNP
if (!err)
isa_registered = 1;
err = pnp_register_driver(&es18xx_pnp_driver);
if (!err)
pnp_registered = 1;
err = pnp_register_card_driver(&es18xx_pnpc_driver);
if (!err)
pnpc_registered = 1;
if (isa_registered || pnp_registered)
err = 0;
#endif
return 0;
return err;
}
static void __exit alsa_card_es18xx_exit(void)
......@@ -2487,8 +2493,9 @@ static void __exit alsa_card_es18xx_exit(void)
pnp_unregister_card_driver(&es18xx_pnpc_driver);
if (pnp_registered)
pnp_unregister_driver(&es18xx_pnp_driver);
if (isa_registered)
#endif
isa_unregister_driver(&snd_es18xx_isa_driver);
isa_unregister_driver(&snd_es18xx_isa_driver);
}
module_init(alsa_card_es18xx_init)
......
......@@ -135,6 +135,7 @@ struct snd_interwave {
#ifdef CONFIG_PNP
static int isa_registered;
static int pnp_registered;
static struct pnp_card_device_id snd_interwave_pnpids[] = {
......@@ -934,15 +935,18 @@ static int __init alsa_card_interwave_init(void)
int err;
err = isa_register_driver(&snd_interwave_driver, SNDRV_CARDS);
if (err < 0)
return err;
#ifdef CONFIG_PNP
/* ISA PnP cards */
if (!err)
isa_registered = 1;
err = pnp_register_card_driver(&interwave_pnpc_driver);
if (!err)
pnp_registered = 1;
if (isa_registered)
err = 0;
#endif
return 0;
return err;
}
static void __exit alsa_card_interwave_exit(void)
......@@ -950,8 +954,9 @@ static void __exit alsa_card_interwave_exit(void)
#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&interwave_pnpc_driver);
if (isa_registered)
#endif
isa_unregister_driver(&snd_interwave_driver);
isa_unregister_driver(&snd_interwave_driver);
}
module_init(alsa_card_interwave_init)
......
......@@ -92,6 +92,7 @@ module_param_array(opl3sa3_ymode, int, NULL, 0444);
MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi.");
#ifdef CONFIG_PNP
static int isa_registered;
static int pnp_registered;
static int pnpc_registered;
#endif
......@@ -967,17 +968,22 @@ static int __init alsa_card_opl3sa2_init(void)
int err;
err = isa_register_driver(&snd_opl3sa2_isa_driver, SNDRV_CARDS);
if (err < 0)
return err;
#ifdef CONFIG_PNP
if (!err)
isa_registered = 1;
err = pnp_register_driver(&opl3sa2_pnp_driver);
if (!err)
pnp_registered = 1;
err = pnp_register_card_driver(&opl3sa2_pnpc_driver);
if (!err)
pnpc_registered = 1;
if (isa_registered || pnp_registered)
err = 0;
#endif
return 0;
return err;
}
static void __exit alsa_card_opl3sa2_exit(void)
......@@ -987,8 +993,9 @@ static void __exit alsa_card_opl3sa2_exit(void)
pnp_unregister_card_driver(&opl3sa2_pnpc_driver);
if (pnp_registered)
pnp_unregister_driver(&opl3sa2_pnp_driver);
if (isa_registered)
#endif
isa_unregister_driver(&snd_opl3sa2_isa_driver);
isa_unregister_driver(&snd_opl3sa2_isa_driver);
}
module_init(alsa_card_opl3sa2_init)
......
......@@ -129,6 +129,7 @@ MODULE_PARM_DESC(seq_ports, "Number of sequencer ports for WaveTable synth.");
#endif
#ifdef CONFIG_PNP
static int isa_registered;
static int pnp_registered;
#endif
......@@ -702,15 +703,18 @@ static int __init alsa_card_sb16_init(void)
int err;
err = isa_register_driver(&snd_sb16_isa_driver, SNDRV_CARDS);
if (err < 0)
return err;
#ifdef CONFIG_PNP
/* PnP cards at last */
if (!err)
isa_registered = 1;
err = pnp_register_card_driver(&sb16_pnpc_driver);
if (!err)
pnp_registered = 1;
if (isa_registered)
err = 0;
#endif
return 0;
return err;
}
static void __exit alsa_card_sb16_exit(void)
......@@ -718,8 +722,9 @@ static void __exit alsa_card_sb16_exit(void)
#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&sb16_pnpc_driver);
if (isa_registered)
#endif
isa_unregister_driver(&snd_sb16_isa_driver);
isa_unregister_driver(&snd_sb16_isa_driver);
}
module_init(alsa_card_sb16_init)
......
......@@ -69,7 +69,9 @@ module_param_array(dma, int, NULL, 0444);
MODULE_PARM_DESC(dma, "DMA # for SoundScape driver.");
#ifdef CONFIG_PNP
static int isa_registered;
static int pnp_registered;
static struct pnp_card_device_id sscape_pnpids[] = {
{ .id = "ENS3081", .devs = { { "ENS0000" } } },
{ .id = "" } /* end */
......@@ -1405,22 +1407,21 @@ static struct pnp_card_driver sscape_pnpc_driver = {
static int __init sscape_init(void)
{
int ret;
int err;
/*
* First check whether we were passed any parameters.
* These MUST take precedence over ANY automatic way
* of allocating cards, because the operator is
* S-P-E-L-L-I-N-G it out for us...
*/
ret = isa_register_driver(&snd_sscape_driver, SNDRV_CARDS);
if (ret < 0)
return ret;
err = isa_register_driver(&snd_sscape_driver, SNDRV_CARDS);
#ifdef CONFIG_PNP
if (pnp_register_card_driver(&sscape_pnpc_driver) == 0)
if (!err)
isa_registered = 1;
err = pnp_register_card_driver(&sscape_pnpc_driver);
if (!err)
pnp_registered = 1;
if (isa_registered)
err = 0;
#endif
return 0;
return err;
}
static void __exit sscape_exit(void)
......@@ -1428,8 +1429,9 @@ static void __exit sscape_exit(void)
#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&sscape_pnpc_driver);
if (isa_registered)
#endif
isa_unregister_driver(&snd_sscape_driver);
isa_unregister_driver(&snd_sscape_driver);
}
module_init(sscape_init);
......
......@@ -86,6 +86,7 @@ module_param_array(use_cs4232_midi, bool, NULL, 0444);
MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");
#ifdef CONFIG_PNP
static int isa_registered;
static int pnp_registered;
static struct pnp_card_device_id snd_wavefront_pnpids[] = {
......@@ -706,14 +707,18 @@ static int __init alsa_card_wavefront_init(void)
int err;
err = isa_register_driver(&snd_wavefront_driver, SNDRV_CARDS);
if (err < 0)
return err;
#ifdef CONFIG_PNP
if (!err)
isa_registered = 1;
err = pnp_register_card_driver(&wavefront_pnpc_driver);
if (!err)
pnp_registered = 1;
if (isa_registered)
err = 0;
#endif
return 0;
return err;
}
static void __exit alsa_card_wavefront_exit(void)
......@@ -721,8 +726,9 @@ static void __exit alsa_card_wavefront_exit(void)
#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&wavefront_pnpc_driver);
if (isa_registered)
#endif
isa_unregister_driver(&snd_wavefront_driver);
isa_unregister_driver(&snd_wavefront_driver);
}
module_init(alsa_card_wavefront_init)
......
......@@ -1782,6 +1782,11 @@ static unsigned int ad1981_jacks_blacklist[] = {
0x10140534, /* Thinkpad X31 */
0x10140537, /* Thinkpad T41p */
0x10140554, /* Thinkpad T42p/R50p */
0x10140567, /* Thinkpad T43p 2668-G7U */
0x10140581, /* Thinkpad X41-2527 */
0x104380b0, /* Asus A7V8X-MX */
0x11790241, /* Toshiba Satellite A-15 S127 */
0x144dc01a, /* Samsung NP-X20C004/SEG */
0 /* end */
};
......
......@@ -707,7 +707,8 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction)
direction == HDA_OUTPUT ?
AC_PAR_AMP_OUT_CAP :
AC_PAR_AMP_IN_CAP);
info->status |= INFO_AMP_CAPS;
if (info->amp_caps)
info->status |= INFO_AMP_CAPS;
}
return info->amp_caps;
}
......
This diff is collapsed.
......@@ -467,6 +467,8 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
"Dell XPS M1710", STAC_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cf,
"Dell Precision M90", STAC_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d6,
"unknown Dell", STAC_REF),
{} /* terminator */
};
......
......@@ -1797,6 +1797,18 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
.name = "Dell Unknown", /* STAC9750/51 */
.type = AC97_TUNE_HP_ONLY
},
{
.subvendor = 0x1028,
.subdevice = 0x0186,
.name = "Dell Latitude D810", /* cf. Malone #41015 */
.type = AC97_TUNE_HP_MUTE_LED
},
{
.subvendor = 0x1028,
.subdevice = 0x0188,
.name = "Dell Inspiron 6000",
.type = AC97_TUNE_HP_MUTE_LED /* cf. Malone #41015 */
},
{
.subvendor = 0x1028,
.subdevice = 0x0191,
......@@ -1819,7 +1831,7 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
.subvendor = 0x103c,
.subdevice = 0x088c,
.name = "HP nc8000",
.type = AC97_TUNE_MUTE_LED
.type = AC97_TUNE_HP_MUTE_LED
},
{
.subvendor = 0x103c,
......@@ -1911,6 +1923,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
.name = "Fujitsu S6210", /* STAC9750/51 */
.type = AC97_TUNE_HP_ONLY
},
{
.subvendor = 0x10cf,
.subdevice = 0x127e,
.name = "Fujitsu Lifebook C1211D",
.type = AC97_TUNE_HP_ONLY
},
{
.subvendor = 0x10cf,
.subdevice = 0x12ec,
......
......@@ -43,8 +43,9 @@ static int ac97_prepare(struct snd_pcm_substream *substream)
#define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)
static struct snd_soc_codec_dai ac97_dai = {
struct snd_soc_codec_dai ac97_dai = {
.name = "AC97 HiFi",
.type = SND_SOC_DAI_AC97,
.playback = {
.stream_name = "AC97 Playback",
.channels_min = 1,
......
......@@ -544,6 +544,7 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream)
struct snd_soc_codec_dai wm9712_dai[] = {
{
.name = "AC97 HiFi",
.type = SND_SOC_DAI_AC97_BUS,
.playback = {
.stream_name = "HiFi Playback",
.channels_min = 1,
......
......@@ -116,6 +116,7 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec)
static inline const char* get_dai_name(int type)
{
switch(type) {
case SND_SOC_DAI_AC97_BUS:
case SND_SOC_DAI_AC97:
return "AC97";
case SND_SOC_DAI_I2S:
......@@ -1099,7 +1100,8 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
continue;
}
}
if (socdev->machine->dai_link[i].cpu_dai->type == SND_SOC_DAI_AC97)
if (socdev->machine->dai_link[i].codec_dai->type ==
SND_SOC_DAI_AC97_BUS)
ac97 = 1;
}
snprintf(codec->card->shortname, sizeof(codec->card->shortname),
......@@ -1148,11 +1150,21 @@ EXPORT_SYMBOL_GPL(snd_soc_register_card);
void snd_soc_free_pcms(struct snd_soc_device *socdev)
{
struct snd_soc_codec *codec = socdev->codec;
#ifdef CONFIG_SND_SOC_AC97_BUS
struct snd_soc_codec_dai *codec_dai;
int i;
#endif
mutex_lock(&codec->mutex);
#ifdef CONFIG_SND_SOC_AC97_BUS
if (codec->ac97)
soc_ac97_dev_unregister(codec);
for(i = 0; i < codec->num_dai; i++) {
codec_dai = &codec->dai[i];
if (codec_dai->type == SND_SOC_DAI_AC97_BUS && codec->ac97) {
soc_ac97_dev_unregister(codec);
goto free_card;
}
}
free_card:
#endif
if (codec->card)
......
......@@ -360,7 +360,7 @@ static int get_ctl_value(struct usb_mixer_elem_info *cval, int request, int vali
request,
USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
validx, cval->mixer->ctrlif | (cval->id << 8),
buf, val_len, 100) >= 0) {
buf, val_len, 100) >= val_len) {
*value_ret = convert_signed_value(cval, snd_usb_combine_bytes(buf, val_len));
return 0;
}
......
......@@ -43,6 +43,15 @@
* Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
* class matches do not take effect without an explicit ID match.
*/
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
USB_DEVICE_ID_MATCH_INT_SUBCLASS,
.idVendor = 0x046d,
.idProduct = 0x0850,
.bInterfaceClass = USB_CLASS_AUDIO,
.bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
},
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
USB_DEVICE_ID_MATCH_INT_CLASS |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment