Commit 744f51e8 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'topic/usb-validation' into for-next



Pull USB validation patches.  It's based on the latest 5.3 development
branch, so we shall catch up the whole things.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parents 051c78af b8e4f1fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ int iso_packets_buffer_init(struct iso_packets_buffer *b, struct fw_unit *unit,
	packets_per_page = PAGE_SIZE / packet_size;
	if (WARN_ON(!packets_per_page)) {
		err = -EINVAL;
		goto error;
		goto err_packets;
	}
	pages = DIV_ROUND_UP(count, packets_per_page);

+9 −4
Original line number Diff line number Diff line
@@ -598,11 +598,9 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
	}
	runtime->private_data = azx_dev;

	if (chip->gts_present)
		azx_pcm_hw.info = azx_pcm_hw.info |
			SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME;

	runtime->hw = azx_pcm_hw;
	if (chip->gts_present)
		runtime->hw.info |= SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME;
	runtime->hw.channels_min = hinfo->channels_min;
	runtime->hw.channels_max = hinfo->channels_max;
	runtime->hw.formats = hinfo->formats;
@@ -615,6 +613,13 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
				     20,
				     178000000);

	/* by some reason, the playback stream stalls on PulseAudio with
	 * tsched=1 when a capture stream triggers.  Until we figure out the
	 * real cause, disable tsched mode by telling the PCM info flag.
	 */
	if (chip->driver_caps & AZX_DCAPS_AMD_WORKAROUND)
		runtime->hw.info |= SNDRV_PCM_INFO_BATCH;

	if (chip->align_buffer_size)
		/* constrain buffer sizes to be multiple of 128
		   bytes. This is more efficient in terms of memory
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
/* 14 unused */
#define AZX_DCAPS_CTX_WORKAROUND (1 << 15)	/* X-Fi workaround */
#define AZX_DCAPS_POSFIX_LPIB	(1 << 16)	/* Use LPIB as default */
/* 17 unused */
#define AZX_DCAPS_AMD_WORKAROUND (1 << 17)	/* AMD-specific workaround */
#define AZX_DCAPS_NO_64BIT	(1 << 18)	/* No 64bit address */
#define AZX_DCAPS_SYNC_WRITE	(1 << 19)	/* sync each cmd write */
#define AZX_DCAPS_OLD_SSYNC	(1 << 20)	/* Old SSYNC reg for ICH */
+20 −1
Original line number Diff line number Diff line
@@ -6051,6 +6051,24 @@ void snd_hda_gen_free(struct hda_codec *codec)
}
EXPORT_SYMBOL_GPL(snd_hda_gen_free);

/**
 * snd_hda_gen_reboot_notify - Make codec enter D3 before rebooting
 * @codec: the HDA codec
 *
 * This can be put as patch_ops reboot_notify function.
 */
void snd_hda_gen_reboot_notify(struct hda_codec *codec)
{
	/* Make the codec enter D3 to avoid spurious noises from the internal
	 * speaker during (and after) reboot
	 */
	snd_hda_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3);
	snd_hda_codec_write(codec, codec->core.afg, 0,
			    AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
	msleep(10);
}
EXPORT_SYMBOL_GPL(snd_hda_gen_reboot_notify);

#ifdef CONFIG_PM
/**
 * snd_hda_gen_check_power_status - check the loopback power save state
@@ -6078,6 +6096,7 @@ static const struct hda_codec_ops generic_patch_ops = {
	.init = snd_hda_gen_init,
	.free = snd_hda_gen_free,
	.unsol_event = snd_hda_jack_unsol_event,
	.reboot_notify = snd_hda_gen_reboot_notify,
#ifdef CONFIG_PM
	.check_power_status = snd_hda_gen_check_power_status,
#endif
@@ -6100,7 +6119,7 @@ static int snd_hda_parse_generic_codec(struct hda_codec *codec)

	err = snd_hda_parse_pin_defcfg(codec, &spec->autocfg, NULL, 0);
	if (err < 0)
		return err;
		goto error;

	err = snd_hda_gen_parse_auto_config(codec, &spec->autocfg);
	if (err < 0)
+1 −0
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
				  struct auto_pin_cfg *cfg);
int snd_hda_gen_build_controls(struct hda_codec *codec);
int snd_hda_gen_build_pcms(struct hda_codec *codec);
void snd_hda_gen_reboot_notify(struct hda_codec *codec);

/* standard jack event callbacks */
void snd_hda_gen_hp_automute(struct hda_codec *codec,
Loading