Skip to content

Commit 2dbb0e6

Browse files
committed
Merge tag 'sound-fix-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Some cleaning after the first batch; mostly about HD-audio quirks but also some NULL dereference fixes in corner cases and a random build error fix, too" * tag 'sound-fix-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Add support headset mode for New DELL WYSE NB ALSA: hda/realtek - Add support headset mode for DELL WYSE AIO ALSA: hda/realtek: merge alc_fixup_headset_jack to alc295_fixup_chromebook ALSA: pcm: Fix function name in kernel-doc comment ALSA: hda: hdmi - add Icelake support ALSA: hda - add more quirks for HP Z2 G4 and HP Z240 ALSA: hda/realtek - Fixed Headset Mic JD not stable ALSA: hda/realtek: Enable headset MIC of Acer TravelMate X514-51T with ALC255 ALSA: hda/tegra: avoid build error without CONFIG_PM ALSA: usx2y: Fix potential NULL pointer dereference ALSA: hda: Avoid NULL pointer dereference at snd_hdac_stream_start()
2 parents 8264fd0 + da484d0 commit 2dbb0e6

File tree

7 files changed

+126
-33
lines changed

7 files changed

+126
-33
lines changed

include/sound/pcm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ static inline snd_pcm_uframes_t snd_pcm_playback_avail(struct snd_pcm_runtime *r
750750
}
751751

752752
/**
753-
* snd_pcm_playback_avail - Get the available (readable) space for capture
753+
* snd_pcm_capture_avail - Get the available (readable) space for capture
754754
* @runtime: PCM runtime instance
755755
*
756756
* Result is between 0 ... (boundary - 1)

sound/hda/hdac_stream.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start)
9595
1 << azx_dev->index,
9696
1 << azx_dev->index);
9797
/* set stripe control */
98-
stripe_ctl = snd_hdac_get_stream_stripe_ctl(bus, azx_dev->substream);
98+
if (azx_dev->substream)
99+
stripe_ctl = snd_hdac_get_stream_stripe_ctl(bus, azx_dev->substream);
100+
else
101+
stripe_ctl = 0;
99102
snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK,
100103
stripe_ctl);
101104
/* set DMA start and interrupt mask */

sound/pci/hda/hda_tegra.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ static int hda_tegra_enable_clocks(struct hda_tegra *data)
219219
return rc;
220220
}
221221

222-
#ifdef CONFIG_PM_SLEEP
223222
static void hda_tegra_disable_clocks(struct hda_tegra *data)
224223
{
225224
clk_disable_unprepare(data->hda2hdmi_clk);
@@ -230,7 +229,7 @@ static void hda_tegra_disable_clocks(struct hda_tegra *data)
230229
/*
231230
* power management
232231
*/
233-
static int hda_tegra_suspend(struct device *dev)
232+
static int __maybe_unused hda_tegra_suspend(struct device *dev)
234233
{
235234
struct snd_card *card = dev_get_drvdata(dev);
236235
int rc;
@@ -243,7 +242,7 @@ static int hda_tegra_suspend(struct device *dev)
243242
return 0;
244243
}
245244

246-
static int hda_tegra_resume(struct device *dev)
245+
static int __maybe_unused hda_tegra_resume(struct device *dev)
247246
{
248247
struct snd_card *card = dev_get_drvdata(dev);
249248
int rc;
@@ -255,10 +254,8 @@ static int hda_tegra_resume(struct device *dev)
255254

256255
return 0;
257256
}
258-
#endif /* CONFIG_PM_SLEEP */
259257

260-
#ifdef CONFIG_PM
261-
static int hda_tegra_runtime_suspend(struct device *dev)
258+
static int __maybe_unused hda_tegra_runtime_suspend(struct device *dev)
262259
{
263260
struct snd_card *card = dev_get_drvdata(dev);
264261
struct azx *chip = card->private_data;
@@ -275,7 +272,7 @@ static int hda_tegra_runtime_suspend(struct device *dev)
275272
return 0;
276273
}
277274

278-
static int hda_tegra_runtime_resume(struct device *dev)
275+
static int __maybe_unused hda_tegra_runtime_resume(struct device *dev)
279276
{
280277
struct snd_card *card = dev_get_drvdata(dev);
281278
struct azx *chip = card->private_data;
@@ -292,7 +289,6 @@ static int hda_tegra_runtime_resume(struct device *dev)
292289

293290
return 0;
294291
}
295-
#endif /* CONFIG_PM */
296292

297293
static const struct dev_pm_ops hda_tegra_pm = {
298294
SET_SYSTEM_SLEEP_PM_OPS(hda_tegra_suspend, hda_tegra_resume)

sound/pci/hda/patch_conexant.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,9 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
936936
SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
937937
SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
938938
SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
939+
SND_PCI_QUIRK(0x103c, 0x8456, "HP Z2 G4 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
940+
SND_PCI_QUIRK(0x103c, 0x8457, "HP Z2 G4 mini", CXT_FIXUP_HP_MIC_NO_PRESENCE),
941+
SND_PCI_QUIRK(0x103c, 0x8458, "HP Z2 G4 mini premium", CXT_FIXUP_HP_MIC_NO_PRESENCE),
939942
SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
940943
SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
941944
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),

sound/pci/hda/patch_hdmi.c

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
5757
#define is_geminilake(codec) (((codec)->core.vendor_id == 0x8086280d) || \
5858
((codec)->core.vendor_id == 0x80862800))
5959
#define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c)
60+
#define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f)
6061
#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \
6162
|| is_skylake(codec) || is_broxton(codec) \
62-
|| is_kabylake(codec)) || is_geminilake(codec) \
63-
|| is_cannonlake(codec)
63+
|| is_kabylake(codec) || is_geminilake(codec) \
64+
|| is_cannonlake(codec) || is_icelake(codec))
6465
#define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882)
6566
#define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883)
6667
#define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec))
@@ -181,6 +182,8 @@ struct hdmi_spec {
181182

182183
struct hdac_chmap chmap;
183184
hda_nid_t vendor_nid;
185+
const int *port_map;
186+
int port_num;
184187
};
185188

186189
#ifdef CONFIG_SND_HDA_COMPONENT
@@ -2418,12 +2421,11 @@ static void intel_haswell_fixup_connect_list(struct hda_codec *codec,
24182421
snd_hda_override_conn_list(codec, nid, spec->num_cvts, spec->cvt_nids);
24192422
}
24202423

2421-
#define INTEL_VENDOR_NID 0x08
2422-
#define INTEL_GLK_VENDOR_NID 0x0B
2423-
#define INTEL_GET_VENDOR_VERB 0xf81
2424-
#define INTEL_SET_VENDOR_VERB 0x781
2425-
#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
2426-
#define INTEL_EN_ALL_PIN_CVTS 0x01 /* enable 2nd & 3rd pins and convertors */
2424+
#define INTEL_GET_VENDOR_VERB 0xf81
2425+
#define INTEL_GET_VENDOR_VERB 0xf81
2426+
#define INTEL_SET_VENDOR_VERB 0x781
2427+
#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
2428+
#define INTEL_EN_ALL_PIN_CVTS 0x01 /* enable 2nd & 3rd pins and convertors */
24272429

24282430
static void intel_haswell_enable_all_pins(struct hda_codec *codec,
24292431
bool update_tree)
@@ -2503,11 +2505,29 @@ static int intel_base_nid(struct hda_codec *codec)
25032505

25042506
static int intel_pin2port(void *audio_ptr, int pin_nid)
25052507
{
2506-
int base_nid = intel_base_nid(audio_ptr);
2508+
struct hda_codec *codec = audio_ptr;
2509+
struct hdmi_spec *spec = codec->spec;
2510+
int base_nid, i;
25072511

2508-
if (WARN_ON(pin_nid < base_nid || pin_nid >= base_nid + 3))
2509-
return -1;
2510-
return pin_nid - base_nid + 1; /* intel port is 1-based */
2512+
if (!spec->port_num) {
2513+
base_nid = intel_base_nid(codec);
2514+
if (WARN_ON(pin_nid < base_nid || pin_nid >= base_nid + 3))
2515+
return -1;
2516+
return pin_nid - base_nid + 1; /* intel port is 1-based */
2517+
}
2518+
2519+
/*
2520+
* looking for the pin number in the mapping table and return
2521+
* the index which indicate the port number
2522+
*/
2523+
for (i = 0; i < spec->port_num; i++) {
2524+
if (pin_nid == spec->port_map[i])
2525+
return i + 1;
2526+
}
2527+
2528+
/* return -1 if pin number exceeds our expectation */
2529+
codec_info(codec, "Can't find the HDMI/DP port for pin %d\n", pin_nid);
2530+
return -1;
25112531
}
25122532

25132533
static void intel_pin_eld_notify(void *audio_ptr, int port, int pipe)
@@ -2608,7 +2628,8 @@ static int parse_intel_hdmi(struct hda_codec *codec)
26082628
}
26092629

26102630
/* Intel Haswell and onwards; audio component with eld notifier */
2611-
static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid)
2631+
static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
2632+
const int *port_map, int port_num)
26122633
{
26132634
struct hdmi_spec *spec;
26142635
int err;
@@ -2620,6 +2641,8 @@ static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid)
26202641
codec->dp_mst = true;
26212642
spec->dyn_pcm_assign = true;
26222643
spec->vendor_nid = vendor_nid;
2644+
spec->port_map = port_map;
2645+
spec->port_num = port_num;
26232646

26242647
intel_haswell_enable_all_pins(codec, true);
26252648
intel_haswell_fixup_enable_dp12(codec);
@@ -2638,12 +2661,23 @@ static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid)
26382661

26392662
static int patch_i915_hsw_hdmi(struct hda_codec *codec)
26402663
{
2641-
return intel_hsw_common_init(codec, INTEL_VENDOR_NID);
2664+
return intel_hsw_common_init(codec, 0x08, NULL, 0);
26422665
}
26432666

26442667
static int patch_i915_glk_hdmi(struct hda_codec *codec)
26452668
{
2646-
return intel_hsw_common_init(codec, INTEL_GLK_VENDOR_NID);
2669+
return intel_hsw_common_init(codec, 0x0b, NULL, 0);
2670+
}
2671+
2672+
static int patch_i915_icl_hdmi(struct hda_codec *codec)
2673+
{
2674+
/*
2675+
* pin to port mapping table where the value indicate the pin number and
2676+
* the index indicate the port number with 1 base.
2677+
*/
2678+
static const int map[] = {0x4, 0x6, 0x8, 0xa, 0xb};
2679+
2680+
return intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map));
26472681
}
26482682

26492683
/* Intel Baytrail and Braswell; with eld notifier */
@@ -3886,6 +3920,7 @@ HDA_CODEC_ENTRY(0x11069f81, "VX900 HDMI/DP", patch_via_hdmi),
38863920
HDA_CODEC_ENTRY(0x11069f84, "VX11 HDMI/DP", patch_generic_hdmi),
38873921
HDA_CODEC_ENTRY(0x11069f85, "VX11 HDMI/DP", patch_generic_hdmi),
38883922
HDA_CODEC_ENTRY(0x80860054, "IbexPeak HDMI", patch_i915_cpt_hdmi),
3923+
HDA_CODEC_ENTRY(0x80862800, "Geminilake HDMI", patch_i915_glk_hdmi),
38893924
HDA_CODEC_ENTRY(0x80862801, "Bearlake HDMI", patch_generic_hdmi),
38903925
HDA_CODEC_ENTRY(0x80862802, "Cantiga HDMI", patch_generic_hdmi),
38913926
HDA_CODEC_ENTRY(0x80862803, "Eaglelake HDMI", patch_generic_hdmi),
@@ -3899,7 +3934,7 @@ HDA_CODEC_ENTRY(0x8086280a, "Broxton HDMI", patch_i915_hsw_hdmi),
38993934
HDA_CODEC_ENTRY(0x8086280b, "Kabylake HDMI", patch_i915_hsw_hdmi),
39003935
HDA_CODEC_ENTRY(0x8086280c, "Cannonlake HDMI", patch_i915_glk_hdmi),
39013936
HDA_CODEC_ENTRY(0x8086280d, "Geminilake HDMI", patch_i915_glk_hdmi),
3902-
HDA_CODEC_ENTRY(0x80862800, "Geminilake HDMI", patch_i915_glk_hdmi),
3937+
HDA_CODEC_ENTRY(0x8086280f, "Icelake HDMI", patch_i915_icl_hdmi),
39033938
HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi),
39043939
HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi),
39053940
HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi),

sound/pci/hda/patch_realtek.c

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5491,7 +5491,7 @@ static void alc_headset_btn_callback(struct hda_codec *codec,
54915491
jack->jack->button_state = report;
54925492
}
54935493

5494-
static void alc_fixup_headset_jack(struct hda_codec *codec,
5494+
static void alc295_fixup_chromebook(struct hda_codec *codec,
54955495
const struct hda_fixup *fix, int action)
54965496
{
54975497

@@ -5501,6 +5501,16 @@ static void alc_fixup_headset_jack(struct hda_codec *codec,
55015501
alc_headset_btn_callback);
55025502
snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", false,
55035503
SND_JACK_HEADSET, alc_headset_btn_keymap);
5504+
switch (codec->core.vendor_id) {
5505+
case 0x10ec0295:
5506+
alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */
5507+
alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15);
5508+
break;
5509+
case 0x10ec0236:
5510+
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
5511+
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
5512+
break;
5513+
}
55045514
break;
55055515
case HDA_FIXUP_ACT_INIT:
55065516
switch (codec->core.vendor_id) {
@@ -5670,9 +5680,13 @@ enum {
56705680
ALC294_FIXUP_ASUS_MIC,
56715681
ALC294_FIXUP_ASUS_HEADSET_MIC,
56725682
ALC294_FIXUP_ASUS_SPK,
5673-
ALC225_FIXUP_HEADSET_JACK,
56745683
ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
56755684
ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE,
5685+
ALC255_FIXUP_ACER_HEADSET_MIC,
5686+
ALC295_FIXUP_CHROME_BOOK,
5687+
ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE,
5688+
ALC225_FIXUP_WYSE_AUTO_MUTE,
5689+
ALC225_FIXUP_WYSE_DISABLE_MIC_VREF,
56765690
};
56775691

56785692
static const struct hda_fixup alc269_fixups[] = {
@@ -6615,9 +6629,9 @@ static const struct hda_fixup alc269_fixups[] = {
66156629
.chained = true,
66166630
.chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC
66176631
},
6618-
[ALC225_FIXUP_HEADSET_JACK] = {
6632+
[ALC295_FIXUP_CHROME_BOOK] = {
66196633
.type = HDA_FIXUP_FUNC,
6620-
.v.func = alc_fixup_headset_jack,
6634+
.v.func = alc295_fixup_chromebook,
66216635
},
66226636
[ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = {
66236637
.type = HDA_FIXUP_PINS,
@@ -6639,6 +6653,38 @@ static const struct hda_fixup alc269_fixups[] = {
66396653
.chained = true,
66406654
.chain_id = ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
66416655
},
6656+
[ALC255_FIXUP_ACER_HEADSET_MIC] = {
6657+
.type = HDA_FIXUP_PINS,
6658+
.v.pins = (const struct hda_pintbl[]) {
6659+
{ 0x19, 0x03a11130 },
6660+
{ 0x1a, 0x90a60140 }, /* use as internal mic */
6661+
{ }
6662+
},
6663+
.chained = true,
6664+
.chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
6665+
},
6666+
[ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE] = {
6667+
.type = HDA_FIXUP_PINS,
6668+
.v.pins = (const struct hda_pintbl[]) {
6669+
{ 0x16, 0x01011020 }, /* Rear Line out */
6670+
{ 0x19, 0x01a1913c }, /* use as Front headset mic, without its own jack detect */
6671+
{ }
6672+
},
6673+
.chained = true,
6674+
.chain_id = ALC225_FIXUP_WYSE_AUTO_MUTE
6675+
},
6676+
[ALC225_FIXUP_WYSE_AUTO_MUTE] = {
6677+
.type = HDA_FIXUP_FUNC,
6678+
.v.func = alc_fixup_auto_mute_via_amp,
6679+
.chained = true,
6680+
.chain_id = ALC225_FIXUP_WYSE_DISABLE_MIC_VREF
6681+
},
6682+
[ALC225_FIXUP_WYSE_DISABLE_MIC_VREF] = {
6683+
.type = HDA_FIXUP_FUNC,
6684+
.v.func = alc_fixup_disable_mic_vref,
6685+
.chained = true,
6686+
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
6687+
},
66426688
};
66436689

66446690
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6658,6 +6704,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
66586704
SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
66596705
SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
66606706
SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE),
6707+
SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
66616708
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
66626709
SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
66636710
SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
@@ -6702,6 +6749,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
67026749
SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
67036750
SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC),
67046751
SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB),
6752+
SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE),
6753+
SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE),
67056754
SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB),
67066755
SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
67076756
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
@@ -6764,11 +6813,13 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
67646813
SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
67656814
SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
67666815
SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
6816+
SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6817+
SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
67676818
SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
67686819
SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
67696820
SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360),
6770-
SND_PCI_QUIRK(0x103c, 0x82bf, "HP", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6771-
SND_PCI_QUIRK(0x103c, 0x82c0, "HP", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6821+
SND_PCI_QUIRK(0x103c, 0x82bf, "HP G3 mini", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
6822+
SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
67726823
SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
67736824
SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
67746825
SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
@@ -7048,7 +7099,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
70487099
{.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"},
70497100
{.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"},
70507101
{.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"},
7051-
{.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-sense-combo"},
7102+
{.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-sense-combo"},
70527103
{}
70537104
};
70547105
#define ALC225_STANDARD_PINS \

sound/usb/usx2y/usb_stream.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ static int init_urbs(struct usb_stream_kernel *sk, unsigned use_packsize,
104104

105105
for (u = 0; u < USB_STREAM_NURBS; ++u) {
106106
sk->inurb[u] = usb_alloc_urb(sk->n_o_ps, GFP_KERNEL);
107+
if (!sk->inurb[u])
108+
return -ENOMEM;
109+
107110
sk->outurb[u] = usb_alloc_urb(sk->n_o_ps, GFP_KERNEL);
111+
if (!sk->outurb[u])
112+
return -ENOMEM;
108113
}
109114

110115
if (init_pipe_urbs(sk, use_packsize, sk->inurb, indata, dev, in_pipe) ||

0 commit comments

Comments
 (0)