Commit d9c05d22 authored by Takashi Iwai's avatar Takashi Iwai

Merge branch 'for-linus' into for-next

parents fe07bfda d0e18561
...@@ -312,14 +312,14 @@ static int __init n64audio_probe(struct platform_device *pdev) ...@@ -312,14 +312,14 @@ static int __init n64audio_probe(struct platform_device *pdev)
} }
priv->mi_reg_base = devm_platform_ioremap_resource(pdev, 0); priv->mi_reg_base = devm_platform_ioremap_resource(pdev, 0);
if (!priv->mi_reg_base) { if (IS_ERR(priv->mi_reg_base)) {
err = -EINVAL; err = PTR_ERR(priv->mi_reg_base);
goto fail_dma_alloc; goto fail_dma_alloc;
} }
priv->ai_reg_base = devm_platform_ioremap_resource(pdev, 1); priv->ai_reg_base = devm_platform_ioremap_resource(pdev, 1);
if (!priv->ai_reg_base) { if (IS_ERR(priv->ai_reg_base)) {
err = -EINVAL; err = PTR_ERR(priv->ai_reg_base);
goto fail_dma_alloc; goto fail_dma_alloc;
} }
......
...@@ -991,7 +991,7 @@ static int daio_mgr_dao_init(void *blk, unsigned int idx, unsigned int conf) ...@@ -991,7 +991,7 @@ static int daio_mgr_dao_init(void *blk, unsigned int idx, unsigned int conf)
if (idx < 4) { if (idx < 4) {
/* S/PDIF output */ /* S/PDIF output */
switch ((conf & 0x7)) { switch ((conf & 0xf)) {
case 1: case 1:
set_field(&ctl->txctl[idx], ATXCTL_NUC, 0); set_field(&ctl->txctl[idx], ATXCTL_NUC, 0);
break; break;
......
...@@ -6406,6 +6406,7 @@ enum { ...@@ -6406,6 +6406,7 @@ enum {
ALC236_FIXUP_DELL_AIO_HEADSET_MIC, ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
ALC282_FIXUP_ACER_DISABLE_LINEOUT, ALC282_FIXUP_ACER_DISABLE_LINEOUT,
ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST, ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
ALC256_FIXUP_ACER_HEADSET_MIC,
}; };
static const struct hda_fixup alc269_fixups[] = { static const struct hda_fixup alc269_fixups[] = {
...@@ -7853,6 +7854,16 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -7853,6 +7854,16 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true, .chained = true,
.chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
}, },
[ALC256_FIXUP_ACER_HEADSET_MIC] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */
{ 0x1a, 0x90a1092f }, /* use as internal mic */
{ }
},
.chained = true,
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
},
}; };
static const struct snd_pci_quirk alc269_fixup_tbl[] = { static const struct snd_pci_quirk alc269_fixup_tbl[] = {
...@@ -7879,9 +7890,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -7879,9 +7890,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK), SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK),
SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
......
...@@ -652,10 +652,10 @@ static int set_sample_rate_v2v3(struct snd_usb_audio *chip, ...@@ -652,10 +652,10 @@ static int set_sample_rate_v2v3(struct snd_usb_audio *chip,
cur_rate = prev_rate; cur_rate = prev_rate;
if (cur_rate != rate) { if (cur_rate != rate) {
usb_audio_warn(chip, usb_audio_dbg(chip,
"%d:%d: freq mismatch (RO clock): req %d, clock runs @%d\n", "%d:%d: freq mismatch: req %d, clock runs @%d\n",
fmt->iface, fmt->altsetting, rate, cur_rate); fmt->iface, fmt->altsetting, rate, cur_rate);
return -ENXIO; /* continue processing */
} }
validation: validation:
......
...@@ -1307,6 +1307,17 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval, ...@@ -1307,6 +1307,17 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
/* totally crap, return an error */ /* totally crap, return an error */
return -EINVAL; return -EINVAL;
} }
} else {
/* if the max volume is too low, it's likely a bogus range;
* here we use -96dB as the threshold
*/
if (cval->dBmax <= -9600) {
usb_audio_info(cval->head.mixer->chip,
"%d:%d: bogus dB values (%d/%d), disabling dB reporting\n",
cval->head.id, mixer_ctrl_intf(cval->head.mixer),
cval->dBmin, cval->dBmax);
cval->dBmin = cval->dBmax = 0;
}
} }
return 0; return 0;
......
...@@ -845,13 +845,19 @@ get_sync_ep_from_substream(struct snd_usb_substream *subs) ...@@ -845,13 +845,19 @@ get_sync_ep_from_substream(struct snd_usb_substream *subs)
list_for_each_entry(fp, &subs->fmt_list, list) { list_for_each_entry(fp, &subs->fmt_list, list) {
ep = snd_usb_get_endpoint(chip, fp->endpoint); ep = snd_usb_get_endpoint(chip, fp->endpoint);
if (ep && ep->cur_rate) if (ep && ep->cur_audiofmt) {
return ep; /* if EP is already opened solely for this substream,
* we still allow us to change the parameter; otherwise
* this substream has to follow the existing parameter
*/
if (ep->cur_audiofmt != subs->cur_audiofmt || ep->opened > 1)
return ep;
}
if (!fp->implicit_fb) if (!fp->implicit_fb)
continue; continue;
/* for the implicit fb, check the sync ep as well */ /* for the implicit fb, check the sync ep as well */
ep = snd_usb_get_endpoint(chip, fp->sync_ep); ep = snd_usb_get_endpoint(chip, fp->sync_ep);
if (ep && ep->cur_rate) if (ep && ep->cur_audiofmt)
return ep; return ep;
} }
return NULL; return NULL;
......
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