sound fixes for 4.12-rc7

Nothing exciting here, just a few stable fixes:
 - Suppress spurious kernel WARNING in PCM core
 - Fix potential spin deadlock at error handling in firewire
 - HD-audio PCI ID addition / fixup
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJZTKpPAAoJEGwxgFQ9KSmkuREP/06S8dyQoKYd4OTVo+FrVjnK
 8gzaGqkttaMbBk8sIifQKs0FX6rfoYh2xGkkkMQ11TVyqItbw96RbnMpS8/lV45O
 fuC9Bm+YtoY6zyW3AQBaiCepn2EsoA88WTRv2BG4zEpQfZeFSsMKj432gaLun9Dz
 j7WsheqC+7rBJzXLLsun5RveimA0SQAAuES2bT9N8kDQJa9i7tAOWTKFmtvEj+pz
 thO9FvKqG0zIe0sFtUK+Qj+lkGoL10sOffRD3mGcepyJokM/dT6t6KXj6jk0dhwz
 kzrzQNkEZuWzOrXoBopsmNRStQ4CprU86fKfdBcePmmJqv68jvSe2Hfkrq1unxfd
 pj/BFJlxRKu1BA3zrBfvuiVg4nPhn3zb6djp9ecqAKJFzr5kT7cx2fZ3JEKgbTV1
 eP5aX/LS3iqM/0/sgFAUq+IGCBwTPJNVwE1QlzVBC6cAVFExjifdvrT4W5j1Mbj8
 ncy79J6icLjOrG6ykiKCiYVmDUZnhJnYIALZDB1OKaqLMluwV9s645m2NLnQIH/D
 +YagrFeOXkqELoi4gCnsGf9qGM04ob5F9Xah4DMi+b7tlm9EilNT8Hza4ccTcnDu
 Q7wcjDdNe/HtFp1DnAlOFXOnXkaT/m3UmnGZsL9aSTUXz0P5DOrsE7JG8rHoGadJ
 nTQqpXkDSm5zr4VAtWBX
 =5vmf
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Nothing exciting here, just a few stable fixes:

   - suppress spurious kernel WARNING in PCM core

   - fix potential spin deadlock at error handling in firewire

   - HD-audio PCI ID addition / fixup"

* tag 'sound-4.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Apply quirks to Broxton-T, too
  ALSA: firewire-lib: Fix stall of process context at packet error
  ALSA: pcm: Don't treat NULL chmap as a fatal error
  ALSA: hda - Add Coffelake PCI ID
This commit is contained in:
Linus Torvalds 2017-06-23 17:37:56 -07:00
commit 51c933f208
4 changed files with 17 additions and 8 deletions

View File

@ -2492,7 +2492,7 @@ static int pcm_chmap_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_pcm_substream *substream;
const struct snd_pcm_chmap_elem *map;
if (snd_BUG_ON(!info->chmap))
if (!info->chmap)
return -EINVAL;
substream = snd_pcm_chmap_substream(info, idx);
if (!substream)
@ -2524,7 +2524,7 @@ static int pcm_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag,
unsigned int __user *dst;
int c, count = 0;
if (snd_BUG_ON(!info->chmap))
if (!info->chmap)
return -EINVAL;
if (size < 8)
return -ENOMEM;

View File

@ -682,7 +682,9 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp,
cycle = increment_cycle_count(cycle, 1);
if (s->handle_packet(s, 0, cycle, i) < 0) {
s->packet_index = -1;
amdtp_stream_pcm_abort(s);
if (in_interrupt())
amdtp_stream_pcm_abort(s);
WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
return;
}
}
@ -734,7 +736,9 @@ static void in_stream_callback(struct fw_iso_context *context, u32 tstamp,
/* Queueing error or detecting invalid payload. */
if (i < packets) {
s->packet_index = -1;
amdtp_stream_pcm_abort(s);
if (in_interrupt())
amdtp_stream_pcm_abort(s);
WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
return;
}

View File

@ -135,7 +135,7 @@ struct amdtp_stream {
/* For a PCM substream processing. */
struct snd_pcm_substream *pcm;
struct tasklet_struct period_tasklet;
unsigned int pcm_buffer_pointer;
snd_pcm_uframes_t pcm_buffer_pointer;
unsigned int pcm_period_pointer;
/* To wait for first packet. */

View File

@ -370,10 +370,12 @@ enum {
#define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71)
#define IS_KBL_H(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa2f0)
#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
#define IS_BXT_T(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x1a98)
#define IS_GLK(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x3198)
#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \
IS_KBL(pci) || IS_KBL_LP(pci) || IS_KBL_H(pci) || \
IS_GLK(pci)
#define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci) || \
IS_BXT_T(pci) || IS_KBL(pci) || IS_KBL_LP(pci) || \
IS_KBL_H(pci) || IS_GLK(pci) || IS_CFL(pci))
static char *driver_short_names[] = {
[AZX_DRIVER_ICH] = "HDA Intel",
@ -2378,6 +2380,9 @@ static const struct pci_device_id azx_ids[] = {
/* Kabylake-H */
{ PCI_DEVICE(0x8086, 0xa2f0),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
/* Coffelake */
{ PCI_DEVICE(0x8086, 0xa348),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE},
/* Broxton-P(Apollolake) */
{ PCI_DEVICE(0x8086, 0x5a98),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON },