Skip to contentSkip to conversation

sound fixes for 4.1-rc1

GIT PULL Takashi Iwai 1 participant 1 message Apr 24, 2015 Sound

lore
Share & tools
lore
#0 lore raw

Linus,

please pull sound fixes for v4.1-rc1 from:

git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-fix-4.1-rc1

The topmost commit is e8191a8e475551b277d85cd76c3f0f52fdf42e86

----------------------------------------------------------------

sound fixes for 4.1-rc1

Here are a few fixes that have been pending since the previous pull
request: a regression fix for HD-audio multiple SPDIF / HDMI devices, several ALC256 codec fixes, a couple of i915 HDMI audio fixes, and various small fixes.

Nothing exciting, just boring, but things good to have.

----------------------------------------------------------------

Alexey Khoroshilov (1):
sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND)

Dan Carpenter (1):
ALSA: hda - potential (but unlikely) uninitialized variable

David Henningsson (2):
ALSA: hda - simplify azx_has_pm_runtime
ALSA: hda - fix "num_steps = 0" error on ALC256

Gabriele Mazzotta (1):
ALSA: hda - Mute headphone pin on suspend on XPS13 9333

Hui Wang (1):
ALSA: hda - fix headset mic detection problem for one more machine

Kailang Yang (1):
ALSA: hda/realtek - Fix Headphone Mic doesn't recording for ALC256

Mengdong Lin (2):
ALSA: hda - only sync BCLK to the display clock for Haswell & Broadwell
ALSA: hda - add AZX_DCAPS_I915_POWERWELL to Baytrail

Scott Wood (1):
ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALI

Takamichi Horikawa (1):
ALSA: usb-audio: Fix audio output on Roland SC-D70 sound module

Takashi Iwai (1):
ALSA: hda - Fix regression for slave SPDIF setups

Vinod Koul (1):
ALSA: asound.h - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN

---
 include/uapi/sound/asound.h    |  2 +-
 sound/oss/sequencer.c          | 12 ++---------
 sound/pci/hda/hda_codec.c      |  2 +-
 sound/pci/hda/hda_controller.h |  2 +-
 sound/pci/hda/hda_i915.c       |  6 ++++++
 sound/pci/hda/hda_intel.c      |  5 ++++-
 sound/pci/hda/hda_proc.c       |  4 ++--
 sound/pci/hda/patch_realtek.c  | 47 +++++++++++++++++++++++-------------------
 sound/pci/intel8x0.c           |  4 ++--
 sound/usb/format.c             |  5 ++++-
 sound/usb/quirks-table.h       | 30 ++-------------------------
 11 files changed, 51 insertions(+), 68 deletions(-)
include/uapi/sound/asound.h +1 -1
index 46145a5277fe..a45be6bdcf5b 100644
@@ -864,7 +864,7 @@ struct snd_ctl_elem_id {
 	snd_ctl_elem_iface_t iface;	/* interface identifier */
 	unsigned int device;		/* device/client number */
 	unsigned int subdevice;		/* subdevice (substream) number */
-	unsigned char name[44];		/* ASCII name of item */
+	unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];		/* ASCII name of item */
 	unsigned int index;		/* index of item */
 };
 
sound/oss/sequencer.c +2 -10
index c0eea1dfe90f..f19da4b47c1d 100644
@@ -681,13 +681,8 @@ static int seq_timing_event(unsigned char *event_rec)
 			break;
 
 		case TMR_ECHO:
-			if (seq_mode == SEQ_2)
-				seq_copy_to_input(event_rec, 8);
-			else
-			{
-				parm = (parm << 8 | SEQ_ECHO);
-				seq_copy_to_input((unsigned char *) &parm, 4);
-			}
+			parm = (parm << 8 | SEQ_ECHO);
+			seq_copy_to_input((unsigned char *) &parm, 4);
 			break;
 
 		default:;
@@ -1324,7 +1319,6 @@ int sequencer_ioctl(int dev, struct file *file, unsigned int cmd, void __user *a
 	int mode = translate_mode(file);
 	struct synth_info inf;
 	struct seq_event_rec event_rec;
-	unsigned long flags;
 	int __user *p = arg;
 
 	orig_dev = dev = dev >> 4;
@@ -1479,9 +1473,7 @@ int sequencer_ioctl(int dev, struct file *file, unsigned int cmd, void __user *a
 		case SNDCTL_SEQ_OUTOFBAND:
 			if (copy_from_user(&event_rec, arg, sizeof(event_rec)))
 				return -EFAULT;
-			spin_lock_irqsave(&lock,flags);
 			play_event(event_rec.arr);
-			spin_unlock_irqrestore(&lock,flags);
 			return 0;
 
 		case SNDCTL_MIDI_INFO:
sound/pci/hda/hda_codec.c +1 -1
index e70a7fb393dd..873ed1bce12b 100644
@@ -2529,7 +2529,7 @@ static void set_dig_out(struct hda_codec *codec, hda_nid_t nid,
 	if (!d)
 		return;
 	for (; *d; d++)
-		snd_hdac_regmap_update(&codec->core, nid,
+		snd_hdac_regmap_update(&codec->core, *d,
 				       AC_VERB_SET_DIGI_CONVERT_1, mask, val);
 }
 
sound/pci/hda/hda_controller.h +1 -1
index be1b7ded8d82..0efdb094d21c 100644
@@ -404,7 +404,7 @@ struct azx {
 	((chip)->ops->reg_readb((dev)->sd_addr + AZX_REG_##reg))
 
 #define azx_has_pm_runtime(chip) \
-	(!AZX_DCAPS_PM_RUNTIME || ((chip)->driver_caps & AZX_DCAPS_PM_RUNTIME))
+	((chip)->driver_caps & AZX_DCAPS_PM_RUNTIME)
 
 /* PCM setup */
 static inline struct azx_dev *get_azx_dev(struct snd_pcm_substream *substream)
sound/pci/hda/hda_i915.c +6 -0
index 52a85d87c23c..3052a2b095f7 100644
@@ -55,6 +55,12 @@ void haswell_set_bclk(struct hda_intel *hda)
 	int cdclk_freq;
 	unsigned int bclk_m, bclk_n;
 	struct i915_audio_component *acomp = &hda->audio_component;
+	struct pci_dev *pci = hda->chip.pci;
+
+	/* Only Haswell/Broadwell need set BCLK */
+	if (pci->device != 0x0a0c && pci->device != 0x0c0c
+	   && pci->device != 0x0d0c && pci->device != 0x160c)
+		return;
 
 	if (!acomp->ops)
 		return;
sound/pci/hda/hda_intel.c +4 -1
index e1c210515581..34040d26c94f 100644
@@ -297,6 +297,9 @@ enum {
 	 AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_POWERWELL |\
 	 AZX_DCAPS_SNOOP_TYPE(SCH))
 
+#define AZX_DCAPS_INTEL_BAYTRAIL \
+	(AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_I915_POWERWELL)
+
 #define AZX_DCAPS_INTEL_BRASWELL \
 	(AZX_DCAPS_INTEL_PCH | AZX_DCAPS_I915_POWERWELL)
 
@@ -1992,7 +1995,7 @@ static const struct pci_device_id azx_ids[] = {
 	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
 	/* BayTrail */
 	{ PCI_DEVICE(0x8086, 0x0f04),
-	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM },
+	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BAYTRAIL },
 	/* Braswell */
 	{ PCI_DEVICE(0x8086, 0x2284),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BRASWELL },
sound/pci/hda/hda_proc.c +2 -2
index ee6230767c64..baaf7ed06875 100644
@@ -582,8 +582,8 @@ static void print_conn_list(struct snd_info_buffer *buffer,
 
 	/* Get Cache connections info */
 	cache_len = snd_hda_get_conn_list(codec, nid, &list);
-	if (cache_len != conn_len
-			|| memcmp(list, conn, conn_len)) {
+	if (cache_len >= 0 && (cache_len != conn_len ||
+			      memcmp(list, conn, conn_len) != 0)) {
 		snd_iprintf(buffer, "  In-driver Connection: %d\n", cache_len);
 		if (cache_len > 0) {
 			snd_iprintf(buffer, "    ");
sound/pci/hda/patch_realtek.c +26 -21

86 lines not on this page · raw message

sound/pci/intel8x0.c +2 -2
index 749069aa6997..b120925223ae 100644
@@ -3101,13 +3101,13 @@ static int snd_intel8x0_create(struct snd_card *card,
 		chip->bmaddr = pci_iomap(pci, 3, 0);
 	else
 		chip->bmaddr = pci_iomap(pci, 1, 0);
+
+ port_inited:
 	if (!chip->bmaddr) {
 		dev_err(card->dev, "Controller space ioremap problem\n");
 		snd_intel8x0_free(chip);
 		return -EIO;
 	}
-
- port_inited:
 	chip->bdbars_count = bdbars[device_type];
 
 	/* initialize offsets */
sound/usb/format.c +4 -1
index 8bcc87cf5667..789d19ec035d 100644
@@ -79,7 +79,10 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
 		format = 1 << UAC_FORMAT_TYPE_I_PCM;
 	}
 	if (format & (1 << UAC_FORMAT_TYPE_I_PCM)) {
-		if (chip->usb_id == USB_ID(0x0582, 0x0016) /* Edirol SD-90 */ &&
+		if (((chip->usb_id == USB_ID(0x0582, 0x0016)) ||
+		     /* Edirol SD-90 */
+		     (chip->usb_id == USB_ID(0x0582, 0x000c))) &&
+		     /* Roland SC-D70 */
 		    sample_width == 24 && sample_bytes == 2)
 			sample_bytes = 3;
 		else if (sample_width > sample_bytes * 8) {
sound/usb/quirks-table.h +2 -28
index 07f984d5f516..2f6d3e9a1bcd 100644
@@ -816,37 +816,11 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 		.data = (const struct snd_usb_audio_quirk[]) {
 			{
 				.ifnum = 0,
-				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
-				.data = & (const struct audioformat) {
-					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
-					.channels = 2,
-					.iface = 0,
-					.altsetting = 1,
-					.altset_idx = 1,
-					.attributes = 0,
-					.endpoint = 0x01,
-					.ep_attr = 0x01,
-					.rates = SNDRV_PCM_RATE_CONTINUOUS,
-					.rate_min = 44100,
-					.rate_max = 44100,
-				}
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 			},
 			{
 				.ifnum = 1,
-				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
-				.data = & (const struct audioformat) {
-					.formats = SNDRV_PCM_FMTBIT_S24_3LE,
-					.channels = 2,
-					.iface = 1,
-					.altsetting = 1,
-					.altset_idx = 1,
-					.attributes = 0,
-					.endpoint = 0x81,
-					.ep_attr = 0x01,
-					.rates = SNDRV_PCM_RATE_CONTINUOUS,
-					.rate_min = 44100,
-					.rate_max = 44100,
-				}
+				.type = QUIRK_AUDIO_STANDARD_INTERFACE
 			},
 			{
 				.ifnum = 2,