Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ab775c7 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'fix/hda' into topic/hda

parents 8b0bd226 2308f4ad
Loading
Loading
Loading
Loading
+17 −23
Original line number Diff line number Diff line
@@ -58,26 +58,6 @@ static const char *sanity_file_name(const char *path)
	else
		return path;
}

/* print file and line with a certain printk prefix */
static int print_snd_pfx(unsigned int level, const char *path, int line,
			 const char *format)
{
	const char *file = sanity_file_name(path);
	char tmp[] = "<0>";
	const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT;
	int ret = 0;

	if (format[0] == '<' && format[2] == '>') {
		tmp[1] = format[1];
		pfx = tmp;
		ret = 1;
	}
	printk("%sALSA %s:%d: ", pfx, file, line);
	return ret;
}
#else
#define print_snd_pfx(level, path, line, format)	0
#endif

#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
@@ -85,15 +65,29 @@ void __snd_printk(unsigned int level, const char *path, int line,
		  const char *format, ...)
{
	va_list args;
#ifdef CONFIG_SND_VERBOSE_PRINTK
	struct va_format vaf;
	char verbose_fmt[] = KERN_DEFAULT "ALSA %s:%d %pV";
#endif

#ifdef CONFIG_SND_DEBUG	
	if (debug < level)
		return;
#endif

	va_start(args, format);
	if (print_snd_pfx(level, path, line, format))
		format += 3; /* skip the printk level-prefix */
#ifdef CONFIG_SND_VERBOSE_PRINTK
	vaf.fmt = format;
	vaf.va = &args;
	if (format[0] == '<' && format[2] == '>') {
		memcpy(verbose_fmt, format, 3);
		vaf.fmt = format + 3;
	} else if (level)
		memcpy(verbose_fmt, KERN_DEBUG, 3);
	printk(verbose_fmt, sanity_file_name(path), line, &vaf);
#else
	vprintk(format, args);
#endif
	va_end(args);
}
EXPORT_SYMBOL_GPL(__snd_printk);
+8 −0
Original line number Diff line number Diff line
@@ -1440,6 +1440,14 @@ static struct snd_emu_chip_details emu_chip_details[] = {
	 .ca0102_chip = 1,
	 .spk71 = 1,
	 .emu_model = EMU_MODEL_EMU0404}, /* EMU 0404 */
	/* EMU0404 PCIe */
	{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40051102,
	 .driver = "Audigy2", .name = "E-mu 0404 PCIe [MAEM8984]",
	 .id = "EMU0404",
	 .emu10k2_chip = 1,
	 .ca0108_chip = 1,
	 .spk71 = 1,
	 .emu_model = EMU_MODEL_EMU0404}, /* EMU 0404 PCIe ver_03 */
	/* Note that all E-mu cards require kernel 2.6 or newer. */
	{.vendor = 0x1102, .device = 0x0008,
	 .driver = "Audigy2", .name = "SB Audigy 2 Value [Unknown]",
+7 −2
Original line number Diff line number Diff line
@@ -50,7 +50,12 @@ int snd_hda_enable_beep_device(struct hda_codec *codec, int enable);
int snd_hda_attach_beep_device(struct hda_codec *codec, int nid);
void snd_hda_detach_beep_device(struct hda_codec *codec);
#else
#define snd_hda_attach_beep_device(...)		0
#define snd_hda_detach_beep_device(...)
static inline int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
{
	return 0;
}
void snd_hda_detach_beep_device(struct hda_codec *codec)
{
}
#endif
#endif
+1 −0
Original line number Diff line number Diff line
@@ -3103,6 +3103,7 @@ static const struct snd_pci_quirk cxt5066_cfg_tbl[] = {
	SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS),
	SND_PCI_QUIRK(0x17aa, 0x3938, "Lenovo G565", CXT5066_AUTO),
	SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */
	SND_PCI_QUIRK(0x1b0a, 0x2092, "CyberpowerPC Gamer Xplorer N57001", CXT5066_AUTO),
	{}
};

+10 −8
Original line number Diff line number Diff line
@@ -1141,6 +1141,13 @@ static void update_speakers(struct hda_codec *codec)
	struct alc_spec *spec = codec->spec;
	int on;
	/* Control HP pins/amps depending on master_mute state;
	 * in general, HP pins/amps control should be enabled in all cases,
	 * but currently set only for master_mute, just to be safe
	 */
	do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins),
		    spec->autocfg.hp_pins, spec->master_mute, true);
	if (!spec->automute)
		on = 0;
	else
@@ -6202,11 +6209,6 @@ static const struct snd_kcontrol_new alc260_input_mixer[] = {
/* update HP, line and mono out pins according to the master switch */
static void alc260_hp_master_update(struct hda_codec *codec)
{
	struct alc_spec *spec = codec->spec;
	/* change HP pins */
	do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins),
		    spec->autocfg.hp_pins, spec->master_mute, true);
	update_speakers(codec);
}
@@ -11925,7 +11927,7 @@ static const struct hda_verb alc262_nec_verbs[] = {
 *  0x1b = port replicator headphone out
 */
#define ALC_HP_EVENT	0x37
#define ALC_HP_EVENT	ALC880_HP_EVENT
static const struct hda_verb alc262_fujitsu_unsol_verbs[] = {
	{0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
@@ -13315,9 +13317,8 @@ static void alc268_acer_lc_setup(struct hda_codec *codec)
	struct alc_spec *spec = codec->spec;
	spec->autocfg.hp_pins[0] = 0x15;
	spec->autocfg.speaker_pins[0] = 0x14;
	spec->automute_mixer_nid[0] = 0x0f;
	spec->automute = 1;
	spec->automute_mode = ALC_AUTOMUTE_MIXER;
	spec->automute_mode = ALC_AUTOMUTE_AMP;
	spec->ext_mic.pin = 0x18;
	spec->ext_mic.mux_idx = 0;
	spec->int_mic.pin = 0x12;
@@ -13861,6 +13862,7 @@ static const struct snd_pci_quirk alc268_cfg_tbl[] = {
	SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One",
						ALC268_ACER_ASPIRE_ONE),
	SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL),
	SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron 910", ALC268_AUTO),
	SND_PCI_QUIRK_MASK(0x1028, 0xfff0, 0x02b0,
			"Dell Inspiron Mini9/Vostro A90", ALC268_DELL),
	/* almost compatible with toshiba but with optional digital outs;
Loading