Skip to content

Commit d192f0d

Browse files
committed
Merge tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "All stable fixes except for a trivial headset mic fixup: the removal of bogus frame checks in snd-usb-usx2y driver that have regressed in the recent kernel versions, the HD-audio HDMI channel map fix, and a few HD-audio device-specific fixes" * tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Sony VAIO Pro 13 (haswell) now has a working headset jack ALSA: hda - Add a headset mic model for ALC269 and friends ALSA: hda - Fix microphone for Sony VAIO Pro 13 (Haswell model) ALSA: hda - Add fixup for ASUS N56VZ ALSA: hda - hdmi: Fix channel map switch not taking effect ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470 ALSA: snd-usb-usx2y: remove bogus frame checks
2 parents 6cc3026 + fbc78ad commit d192f0d

File tree

5 files changed

+67
-35
lines changed

5 files changed

+67
-35
lines changed

Documentation/sound/alsa/HD-Audio-Models.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ALC269/270/275/276/28x/29x
2828
alc269-dmic Enable ALC269(VA) digital mic workaround
2929
alc271-dmic Enable ALC271X digital mic workaround
3030
inv-dmic Inverted internal mic workaround
31+
headset-mic Indicates a combined headset (headphone+mic) jack
3132
lenovo-dock Enables docking station I/O for some Lenovos
3233
dell-headset-multi Headset jack, which can also be used as mic-in
3334
dell-headset-dock Headset jack (without mic-in), and also dock I/O

sound/pci/hda/patch_hdmi.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,14 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
936936
return;
937937
}
938938

939+
/*
940+
* always configure channel mapping, it may have been changed by the
941+
* user in the meantime
942+
*/
943+
hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
944+
channels, per_pin->chmap,
945+
per_pin->chmap_set);
946+
939947
/*
940948
* sizeof(ai) is used instead of sizeof(*hdmi_ai) or
941949
* sizeof(*dp_ai) to avoid partial match/update problems when
@@ -947,20 +955,10 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
947955
"pin=%d channels=%d\n",
948956
pin_nid,
949957
channels);
950-
hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
951-
channels, per_pin->chmap,
952-
per_pin->chmap_set);
953958
hdmi_stop_infoframe_trans(codec, pin_nid);
954959
hdmi_fill_audio_infoframe(codec, pin_nid,
955960
ai.bytes, sizeof(ai));
956961
hdmi_start_infoframe_trans(codec, pin_nid);
957-
} else {
958-
/* For non-pcm audio switch, setup new channel mapping
959-
* accordingly */
960-
if (per_pin->non_pcm != non_pcm)
961-
hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
962-
channels, per_pin->chmap,
963-
per_pin->chmap_set);
964962
}
965963

966964
per_pin->non_pcm = non_pcm;

sound/pci/hda/patch_realtek.c

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,6 +2819,15 @@ static void alc269_fixup_hweq(struct hda_codec *codec,
28192819
alc_write_coef_idx(codec, 0x1e, coef | 0x80);
28202820
}
28212821

2822+
static void alc269_fixup_headset_mic(struct hda_codec *codec,
2823+
const struct hda_fixup *fix, int action)
2824+
{
2825+
struct alc_spec *spec = codec->spec;
2826+
2827+
if (action == HDA_FIXUP_ACT_PRE_PROBE)
2828+
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
2829+
}
2830+
28222831
static void alc271_fixup_dmic(struct hda_codec *codec,
28232832
const struct hda_fixup *fix, int action)
28242833
{
@@ -3496,6 +3505,15 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
34963505
}
34973506
}
34983507

3508+
static void alc290_fixup_mono_speakers(struct hda_codec *codec,
3509+
const struct hda_fixup *fix, int action)
3510+
{
3511+
if (action == HDA_FIXUP_ACT_PRE_PROBE)
3512+
/* Remove DAC node 0x03, as it seems to be
3513+
giving mono output */
3514+
snd_hda_override_wcaps(codec, 0x03, 0);
3515+
}
3516+
34993517
enum {
35003518
ALC269_FIXUP_SONY_VAIO,
35013519
ALC275_FIXUP_SONY_VAIO_GPIO2,
@@ -3507,6 +3525,7 @@ enum {
35073525
ALC271_FIXUP_DMIC,
35083526
ALC269_FIXUP_PCM_44K,
35093527
ALC269_FIXUP_STEREO_DMIC,
3528+
ALC269_FIXUP_HEADSET_MIC,
35103529
ALC269_FIXUP_QUANTA_MUTE,
35113530
ALC269_FIXUP_LIFEBOOK,
35123531
ALC269_FIXUP_AMIC,
@@ -3519,9 +3538,11 @@ enum {
35193538
ALC269_FIXUP_HP_GPIO_LED,
35203539
ALC269_FIXUP_INV_DMIC,
35213540
ALC269_FIXUP_LENOVO_DOCK,
3541+
ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
35223542
ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
35233543
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
35243544
ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
3545+
ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
35253546
ALC269_FIXUP_HEADSET_MODE,
35263547
ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
35273548
ALC269_FIXUP_ASUS_X101_FUNC,
@@ -3535,6 +3556,7 @@ enum {
35353556
ALC283_FIXUP_CHROME_BOOK,
35363557
ALC282_FIXUP_ASUS_TX300,
35373558
ALC283_FIXUP_INT_MIC,
3559+
ALC290_FIXUP_MONO_SPEAKERS,
35383560
};
35393561

35403562
static const struct hda_fixup alc269_fixups[] = {
@@ -3603,6 +3625,10 @@ static const struct hda_fixup alc269_fixups[] = {
36033625
.type = HDA_FIXUP_FUNC,
36043626
.v.func = alc269_fixup_stereo_dmic,
36053627
},
3628+
[ALC269_FIXUP_HEADSET_MIC] = {
3629+
.type = HDA_FIXUP_FUNC,
3630+
.v.func = alc269_fixup_headset_mic,
3631+
},
36063632
[ALC269_FIXUP_QUANTA_MUTE] = {
36073633
.type = HDA_FIXUP_FUNC,
36083634
.v.func = alc269_fixup_quanta_mute,
@@ -3712,6 +3738,15 @@ static const struct hda_fixup alc269_fixups[] = {
37123738
.chained = true,
37133739
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
37143740
},
3741+
[ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
3742+
.type = HDA_FIXUP_PINS,
3743+
.v.pins = (const struct hda_pintbl[]) {
3744+
{ 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
3745+
{ }
3746+
},
3747+
.chained = true,
3748+
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
3749+
},
37153750
[ALC269_FIXUP_HEADSET_MODE] = {
37163751
.type = HDA_FIXUP_FUNC,
37173752
.v.func = alc_fixup_headset_mode,
@@ -3720,6 +3755,15 @@ static const struct hda_fixup alc269_fixups[] = {
37203755
.type = HDA_FIXUP_FUNC,
37213756
.v.func = alc_fixup_headset_mode_no_hp_mic,
37223757
},
3758+
[ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
3759+
.type = HDA_FIXUP_PINS,
3760+
.v.pins = (const struct hda_pintbl[]) {
3761+
{ 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
3762+
{ }
3763+
},
3764+
.chained = true,
3765+
.chain_id = ALC269_FIXUP_HEADSET_MIC
3766+
},
37233767
[ALC269_FIXUP_ASUS_X101_FUNC] = {
37243768
.type = HDA_FIXUP_FUNC,
37253769
.v.func = alc269_fixup_x101_headset_mic,
@@ -3804,6 +3848,12 @@ static const struct hda_fixup alc269_fixups[] = {
38043848
.chained = true,
38053849
.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
38063850
},
3851+
[ALC290_FIXUP_MONO_SPEAKERS] = {
3852+
.type = HDA_FIXUP_FUNC,
3853+
.v.func = alc290_fixup_mono_speakers,
3854+
.chained = true,
3855+
.chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
3856+
},
38073857
};
38083858

38093859
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -3845,6 +3895,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
38453895
SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
38463896
SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
38473897
SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3898+
SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
38483899
SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
38493900
SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
38503901
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
@@ -3867,6 +3918,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
38673918
SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
38683919
SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
38693920
SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101),
3921+
SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
38703922
SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2),
38713923
SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
38723924
SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
@@ -3952,6 +4004,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
39524004
{.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
39534005
{.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
39544006
{.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
4007+
{.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
39554008
{.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
39564009
{.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
39574010
{.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
@@ -4569,6 +4622,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
45694622
SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
45704623
SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
45714624
SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
4625+
SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4),
45724626
SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
45734627
SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
45744628
SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),

sound/usb/usx2y/usbusx2yaudio.c

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,6 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y,
299299
usX2Y_clients_stop(usX2Y);
300300
}
301301

302-
static void usX2Y_error_sequence(struct usX2Ydev *usX2Y,
303-
struct snd_usX2Y_substream *subs, struct urb *urb)
304-
{
305-
snd_printk(KERN_ERR
306-
"Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n"
307-
"Most probably some urb of usb-frame %i is still missing.\n"
308-
"Cause could be too long delays in usb-hcd interrupt handling.\n",
309-
usb_get_current_frame_number(usX2Y->dev),
310-
subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out",
311-
usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame);
312-
usX2Y_clients_stop(usX2Y);
313-
}
314-
315302
static void i_usX2Y_urb_complete(struct urb *urb)
316303
{
317304
struct snd_usX2Y_substream *subs = urb->context;
@@ -328,12 +315,9 @@ static void i_usX2Y_urb_complete(struct urb *urb)
328315
usX2Y_error_urb_status(usX2Y, subs, urb);
329316
return;
330317
}
331-
if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
332-
subs->completed_urb = urb;
333-
else {
334-
usX2Y_error_sequence(usX2Y, subs, urb);
335-
return;
336-
}
318+
319+
subs->completed_urb = urb;
320+
337321
{
338322
struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE],
339323
*playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];

sound/usb/usx2y/usx2yhwdeppcm.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,8 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb)
244244
usX2Y_error_urb_status(usX2Y, subs, urb);
245245
return;
246246
}
247-
if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
248-
subs->completed_urb = urb;
249-
else {
250-
usX2Y_error_sequence(usX2Y, subs, urb);
251-
return;
252-
}
253247

248+
subs->completed_urb = urb;
254249
capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
255250
capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
256251
playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];

0 commit comments

Comments
 (0)