Skip to content

Commit c8c5285

Browse files
committed
Merge tag 'sound-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "We've had a very calm development cycle, so far. Here are the few fixes for HD-audio and USB-audio, all of which are small and easy" * tag 'sound-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix inconsistent monitor_present state until repoll ALSA: hda - Fix regression of monitor_present flag in eld proc file ALSA: usb-audio: Skip volume controls triggers hangup on Dell USB Dock ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T460s ALSA: sscape: Use correct format identifier for size_t ALSA: usb-audio: Add a quirk for Plantronics BT300 ALSA: usb-audio: Add a sample rate quirk for Phoenix Audio TMX320 ALSA: hda - Bind with i915 only when Intel graphics is present
2 parents a7109a2 + c44da62 commit c8c5285

File tree

6 files changed

+45
-7
lines changed

6 files changed

+45
-7
lines changed

sound/hda/hdac_i915.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,18 @@ int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops
267267
}
268268
EXPORT_SYMBOL_GPL(snd_hdac_i915_register_notifier);
269269

270+
/* check whether intel graphics is present */
271+
static bool i915_gfx_present(void)
272+
{
273+
static struct pci_device_id ids[] = {
274+
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_ANY_ID),
275+
.class = PCI_BASE_CLASS_DISPLAY << 16,
276+
.class_mask = 0xff << 16 },
277+
{}
278+
};
279+
return pci_dev_present(ids);
280+
}
281+
270282
/**
271283
* snd_hdac_i915_init - Initialize i915 audio component
272284
* @bus: HDA core bus
@@ -286,6 +298,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
286298
struct i915_audio_component *acomp;
287299
int ret;
288300

301+
if (!i915_gfx_present())
302+
return -ENODEV;
303+
289304
acomp = kzalloc(sizeof(*acomp), GFP_KERNEL);
290305
if (!acomp)
291306
return -ENOMEM;

sound/isa/sscape.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ static int sscape_upload_microcode(struct snd_card *card, int version)
591591
}
592592
err = upload_dma_data(sscape, init_fw->data, init_fw->size);
593593
if (err == 0)
594-
snd_printk(KERN_INFO "sscape: MIDI firmware loaded %d KBs\n",
594+
snd_printk(KERN_INFO "sscape: MIDI firmware loaded %zu KBs\n",
595595
init_fw->size >> 10);
596596

597597
release_firmware(init_fw);

sound/pci/hda/patch_hdmi.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,6 @@ static bool hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
13961396
struct hda_codec *codec = per_pin->codec;
13971397
struct hdmi_spec *spec = codec->spec;
13981398
struct hdmi_eld *eld = &spec->temp_eld;
1399-
struct hdmi_eld *pin_eld = &per_pin->sink_eld;
14001399
hda_nid_t pin_nid = per_pin->pin_nid;
14011400
/*
14021401
* Always execute a GetPinSense verb here, even when called from
@@ -1413,15 +1412,15 @@ static bool hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
14131412
present = snd_hda_pin_sense(codec, pin_nid);
14141413

14151414
mutex_lock(&per_pin->lock);
1416-
pin_eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE);
1417-
if (pin_eld->monitor_present)
1415+
eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE);
1416+
if (eld->monitor_present)
14181417
eld->eld_valid = !!(present & AC_PINSENSE_ELDV);
14191418
else
14201419
eld->eld_valid = false;
14211420

14221421
codec_dbg(codec,
14231422
"HDMI status: Codec=%d Pin=%d Presence_Detect=%d ELD_Valid=%d\n",
1424-
codec->addr, pin_nid, pin_eld->monitor_present, eld->eld_valid);
1423+
codec->addr, pin_nid, eld->monitor_present, eld->eld_valid);
14251424

14261425
if (eld->eld_valid) {
14271426
if (spec->ops.pin_get_eld(codec, pin_nid, eld->eld_buffer,
@@ -1441,7 +1440,7 @@ static bool hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
14411440
else
14421441
update_eld(codec, per_pin, eld);
14431442

1444-
ret = !repoll || !pin_eld->monitor_present || pin_eld->eld_valid;
1443+
ret = !repoll || !eld->monitor_present || eld->eld_valid;
14451444

14461445
jack = snd_hda_jack_tbl_get(codec, pin_nid);
14471446
if (jack)

sound/pci/hda/patch_realtek.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4760,6 +4760,7 @@ enum {
47604760
ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
47614761
ALC280_FIXUP_HP_HEADSET_MIC,
47624762
ALC221_FIXUP_HP_FRONT_MIC,
4763+
ALC292_FIXUP_TPT460,
47634764
};
47644765

47654766
static const struct hda_fixup alc269_fixups[] = {
@@ -5409,6 +5410,12 @@ static const struct hda_fixup alc269_fixups[] = {
54095410
{ }
54105411
},
54115412
},
5413+
[ALC292_FIXUP_TPT460] = {
5414+
.type = HDA_FIXUP_FUNC,
5415+
.v.func = alc_fixup_tpt440_dock,
5416+
.chained = true,
5417+
.chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
5418+
},
54125419
};
54135420

54145421
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5563,7 +5570,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
55635570
SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
55645571
SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
55655572
SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
5566-
SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
5573+
SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460),
55675574
SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
55685575
SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
55695576
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
@@ -5658,6 +5665,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
56585665
{.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
56595666
{.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
56605667
{.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
5668+
{.id = ALC292_FIXUP_TPT460, .name = "tpt460"},
56615669
{}
56625670
};
56635671
#define ALC225_STANDARD_PINS \

sound/usb/mixer_maps.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,16 @@ static struct usbmix_name_map bose_companion5_map[] = {
348348
{ 0 } /* terminator */
349349
};
350350

351+
/*
352+
* Dell usb dock with ALC4020 codec had a firmware problem where it got
353+
* screwed up when zero volume is passed; just skip it as a workaround
354+
*/
355+
static const struct usbmix_name_map dell_alc4020_map[] = {
356+
{ 16, NULL },
357+
{ 19, NULL },
358+
{ 0 }
359+
};
360+
351361
/*
352362
* Control map entries
353363
*/
@@ -430,6 +440,10 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
430440
.id = USB_ID(0x0ccd, 0x0028),
431441
.map = aureon_51_2_map,
432442
},
443+
{
444+
.id = USB_ID(0x0bda, 0x4014),
445+
.map = dell_alc4020_map,
446+
},
433447
{
434448
.id = USB_ID(0x0dba, 0x1000),
435449
.map = mbox1_map,

sound/usb/quirks.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,9 +1134,11 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
11341134
case USB_ID(0x045E, 0x076F): /* MS Lifecam HD-6000 */
11351135
case USB_ID(0x045E, 0x0772): /* MS Lifecam Studio */
11361136
case USB_ID(0x045E, 0x0779): /* MS Lifecam HD-3000 */
1137+
case USB_ID(0x047F, 0x0415): /* Plantronics BT-300 */
11371138
case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */
11381139
case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
11391140
case USB_ID(0x074D, 0x3553): /* Outlaw RR2150 (Micronas UAC3553B) */
1141+
case USB_ID(0x1de7, 0x0014): /* Phoenix Audio TMX320 */
11401142
case USB_ID(0x21B4, 0x0081): /* AudioQuest DragonFly */
11411143
return true;
11421144
}

0 commit comments

Comments
 (0)