aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-06-23 20:37:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-06-23 20:37:56 -0400
commit51c933f208c51b3e5371779ba3c246bde144ed11 (patch)
tree8c756afbd1dbd1b3a5b890f89a97384cb2e97ae3
parent311548f173ff53bd4c7407eaf52097d00d2ea4de (diff)
parentc7ecb9068e6772c43941ce609f08bc53f36e1dce (diff)
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
-rw-r--r--sound/core/pcm_lib.c4
-rw-r--r--sound/firewire/amdtp-stream.c8
-rw-r--r--sound/firewire/amdtp-stream.h2
-rw-r--r--sound/pci/hda/hda_intel.c11
4 files changed, 17 insertions, 8 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 5088d4b8db22..009e6c98754e 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -2492,7 +2492,7 @@ static int pcm_chmap_ctl_get(struct snd_kcontrol *kcontrol,
2492 struct snd_pcm_substream *substream; 2492 struct snd_pcm_substream *substream;
2493 const struct snd_pcm_chmap_elem *map; 2493 const struct snd_pcm_chmap_elem *map;
2494 2494
2495 if (snd_BUG_ON(!info->chmap)) 2495 if (!info->chmap)
2496 return -EINVAL; 2496 return -EINVAL;
2497 substream = snd_pcm_chmap_substream(info, idx); 2497 substream = snd_pcm_chmap_substream(info, idx);
2498 if (!substream) 2498 if (!substream)
@@ -2524,7 +2524,7 @@ static int pcm_chmap_ctl_tlv(struct snd_kcontrol *kcontrol, int op_flag,
2524 unsigned int __user *dst; 2524 unsigned int __user *dst;
2525 int c, count = 0; 2525 int c, count = 0;
2526 2526
2527 if (snd_BUG_ON(!info->chmap)) 2527 if (!info->chmap)
2528 return -EINVAL; 2528 return -EINVAL;
2529 if (size < 8) 2529 if (size < 8)
2530 return -ENOMEM; 2530 return -ENOMEM;
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 9e6f54f8c45d..1e26854b3425 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -682,7 +682,9 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp,
682 cycle = increment_cycle_count(cycle, 1); 682 cycle = increment_cycle_count(cycle, 1);
683 if (s->handle_packet(s, 0, cycle, i) < 0) { 683 if (s->handle_packet(s, 0, cycle, i) < 0) {
684 s->packet_index = -1; 684 s->packet_index = -1;
685 amdtp_stream_pcm_abort(s); 685 if (in_interrupt())
686 amdtp_stream_pcm_abort(s);
687 WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
686 return; 688 return;
687 } 689 }
688 } 690 }
@@ -734,7 +736,9 @@ static void in_stream_callback(struct fw_iso_context *context, u32 tstamp,
734 /* Queueing error or detecting invalid payload. */ 736 /* Queueing error or detecting invalid payload. */
735 if (i < packets) { 737 if (i < packets) {
736 s->packet_index = -1; 738 s->packet_index = -1;
737 amdtp_stream_pcm_abort(s); 739 if (in_interrupt())
740 amdtp_stream_pcm_abort(s);
741 WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
738 return; 742 return;
739 } 743 }
740 744
diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h
index 7e8831722821..ea1a91e99875 100644
--- a/sound/firewire/amdtp-stream.h
+++ b/sound/firewire/amdtp-stream.h
@@ -135,7 +135,7 @@ struct amdtp_stream {
135 /* For a PCM substream processing. */ 135 /* For a PCM substream processing. */
136 struct snd_pcm_substream *pcm; 136 struct snd_pcm_substream *pcm;
137 struct tasklet_struct period_tasklet; 137 struct tasklet_struct period_tasklet;
138 unsigned int pcm_buffer_pointer; 138 snd_pcm_uframes_t pcm_buffer_pointer;
139 unsigned int pcm_period_pointer; 139 unsigned int pcm_period_pointer;
140 140
141 /* To wait for first packet. */ 141 /* To wait for first packet. */
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 1770f085c2a6..01eb1dc7b5b3 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -370,10 +370,12 @@ enum {
370#define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71) 370#define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71)
371#define IS_KBL_H(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa2f0) 371#define IS_KBL_H(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa2f0)
372#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) 372#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
373#define IS_BXT_T(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x1a98)
373#define IS_GLK(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x3198) 374#define IS_GLK(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x3198)
374#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \ 375#define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
375 IS_KBL(pci) || IS_KBL_LP(pci) || IS_KBL_H(pci) || \ 376#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci) || \
376 IS_GLK(pci) 377 IS_BXT_T(pci) || IS_KBL(pci) || IS_KBL_LP(pci) || \
378 IS_KBL_H(pci) || IS_GLK(pci) || IS_CFL(pci))
377 379
378static char *driver_short_names[] = { 380static char *driver_short_names[] = {
379 [AZX_DRIVER_ICH] = "HDA Intel", 381 [AZX_DRIVER_ICH] = "HDA Intel",
@@ -2378,6 +2380,9 @@ static const struct pci_device_id azx_ids[] = {
2378 /* Kabylake-H */ 2380 /* Kabylake-H */
2379 { PCI_DEVICE(0x8086, 0xa2f0), 2381 { PCI_DEVICE(0x8086, 0xa2f0),
2380 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, 2382 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
2383 /* Coffelake */
2384 { PCI_DEVICE(0x8086, 0xa348),
2385 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE},
2381 /* Broxton-P(Apollolake) */ 2386 /* Broxton-P(Apollolake) */
2382 { PCI_DEVICE(0x8086, 0x5a98), 2387 { PCI_DEVICE(0x8086, 0x5a98),
2383 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, 2388 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON },