aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-24 13:31:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-24 13:31:32 -0400
commitd19d133e432248c9b3efa9c10dda5f050cbbcd72 (patch)
tree740eaf643e4a44df7b09b853578d7f63711874de /sound
parentc6668726d2c2c581e6c417448c472c994d026f5f (diff)
parente8191a8e475551b277d85cd76c3f0f52fdf42e86 (diff)
Merge tag 'sound-fix-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "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" * tag 'sound-fix-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - fix headset mic detection problem for one more machine ALSA: hda/realtek - Fix Headphone Mic doesn't recording for ALC256 ALSA: hda - fix "num_steps = 0" error on ALC256 ALSA: usb-audio: Fix audio output on Roland SC-D70 sound module ALSA: hda - add AZX_DCAPS_I915_POWERWELL to Baytrail ALSA: hda - only sync BCLK to the display clock for Haswell & Broadwell ALSA: hda - Mute headphone pin on suspend on XPS13 9333 sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) ALSA: asound.h - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN ALSA: hda - potential (but unlikely) uninitialized variable ALSA: hda - Fix regression for slave SPDIF setups ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALI ALSA: hda - simplify azx_has_pm_runtime
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/sequencer.c12
-rw-r--r--sound/pci/hda/hda_codec.c2
-rw-r--r--sound/pci/hda/hda_controller.h2
-rw-r--r--sound/pci/hda/hda_i915.c6
-rw-r--r--sound/pci/hda/hda_intel.c5
-rw-r--r--sound/pci/hda/hda_proc.c4
-rw-r--r--sound/pci/hda/patch_realtek.c47
-rw-r--r--sound/pci/intel8x0.c4
-rw-r--r--sound/usb/format.c5
-rw-r--r--sound/usb/quirks-table.h30
10 files changed, 50 insertions, 67 deletions
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c
index c0eea1dfe90f..f19da4b47c1d 100644
--- a/sound/oss/sequencer.c
+++ b/sound/oss/sequencer.c
@@ -681,13 +681,8 @@ static int seq_timing_event(unsigned char *event_rec)
681 break; 681 break;
682 682
683 case TMR_ECHO: 683 case TMR_ECHO:
684 if (seq_mode == SEQ_2) 684 parm = (parm << 8 | SEQ_ECHO);
685 seq_copy_to_input(event_rec, 8); 685 seq_copy_to_input((unsigned char *) &parm, 4);
686 else
687 {
688 parm = (parm << 8 | SEQ_ECHO);
689 seq_copy_to_input((unsigned char *) &parm, 4);
690 }
691 break; 686 break;
692 687
693 default:; 688 default:;
@@ -1324,7 +1319,6 @@ int sequencer_ioctl(int dev, struct file *file, unsigned int cmd, void __user *a
1324 int mode = translate_mode(file); 1319 int mode = translate_mode(file);
1325 struct synth_info inf; 1320 struct synth_info inf;
1326 struct seq_event_rec event_rec; 1321 struct seq_event_rec event_rec;
1327 unsigned long flags;
1328 int __user *p = arg; 1322 int __user *p = arg;
1329 1323
1330 orig_dev = dev = dev >> 4; 1324 orig_dev = dev = dev >> 4;
@@ -1479,9 +1473,7 @@ int sequencer_ioctl(int dev, struct file *file, unsigned int cmd, void __user *a
1479 case SNDCTL_SEQ_OUTOFBAND: 1473 case SNDCTL_SEQ_OUTOFBAND:
1480 if (copy_from_user(&event_rec, arg, sizeof(event_rec))) 1474 if (copy_from_user(&event_rec, arg, sizeof(event_rec)))
1481 return -EFAULT; 1475 return -EFAULT;
1482 spin_lock_irqsave(&lock,flags);
1483 play_event(event_rec.arr); 1476 play_event(event_rec.arr);
1484 spin_unlock_irqrestore(&lock,flags);
1485 return 0; 1477 return 0;
1486 1478
1487 case SNDCTL_MIDI_INFO: 1479 case SNDCTL_MIDI_INFO:
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index e70a7fb393dd..873ed1bce12b 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2529,7 +2529,7 @@ static void set_dig_out(struct hda_codec *codec, hda_nid_t nid,
2529 if (!d) 2529 if (!d)
2530 return; 2530 return;
2531 for (; *d; d++) 2531 for (; *d; d++)
2532 snd_hdac_regmap_update(&codec->core, nid, 2532 snd_hdac_regmap_update(&codec->core, *d,
2533 AC_VERB_SET_DIGI_CONVERT_1, mask, val); 2533 AC_VERB_SET_DIGI_CONVERT_1, mask, val);
2534} 2534}
2535 2535
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index be1b7ded8d82..0efdb094d21c 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -404,7 +404,7 @@ struct azx {
404 ((chip)->ops->reg_readb((dev)->sd_addr + AZX_REG_##reg)) 404 ((chip)->ops->reg_readb((dev)->sd_addr + AZX_REG_##reg))
405 405
406#define azx_has_pm_runtime(chip) \ 406#define azx_has_pm_runtime(chip) \
407 (!AZX_DCAPS_PM_RUNTIME || ((chip)->driver_caps & AZX_DCAPS_PM_RUNTIME)) 407 ((chip)->driver_caps & AZX_DCAPS_PM_RUNTIME)
408 408
409/* PCM setup */ 409/* PCM setup */
410static inline struct azx_dev *get_azx_dev(struct snd_pcm_substream *substream) 410static inline struct azx_dev *get_azx_dev(struct snd_pcm_substream *substream)
diff --git a/sound/pci/hda/hda_i915.c b/sound/pci/hda/hda_i915.c
index 52a85d87c23c..3052a2b095f7 100644
--- a/sound/pci/hda/hda_i915.c
+++ b/sound/pci/hda/hda_i915.c
@@ -55,6 +55,12 @@ void haswell_set_bclk(struct hda_intel *hda)
55 int cdclk_freq; 55 int cdclk_freq;
56 unsigned int bclk_m, bclk_n; 56 unsigned int bclk_m, bclk_n;
57 struct i915_audio_component *acomp = &hda->audio_component; 57 struct i915_audio_component *acomp = &hda->audio_component;
58 struct pci_dev *pci = hda->chip.pci;
59
60 /* Only Haswell/Broadwell need set BCLK */
61 if (pci->device != 0x0a0c && pci->device != 0x0c0c
62 && pci->device != 0x0d0c && pci->device != 0x160c)
63 return;
58 64
59 if (!acomp->ops) 65 if (!acomp->ops)
60 return; 66 return;
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index e1c210515581..34040d26c94f 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -297,6 +297,9 @@ enum {
297 AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_POWERWELL |\ 297 AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_POWERWELL |\
298 AZX_DCAPS_SNOOP_TYPE(SCH)) 298 AZX_DCAPS_SNOOP_TYPE(SCH))
299 299
300#define AZX_DCAPS_INTEL_BAYTRAIL \
301 (AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_I915_POWERWELL)
302
300#define AZX_DCAPS_INTEL_BRASWELL \ 303#define AZX_DCAPS_INTEL_BRASWELL \
301 (AZX_DCAPS_INTEL_PCH | AZX_DCAPS_I915_POWERWELL) 304 (AZX_DCAPS_INTEL_PCH | AZX_DCAPS_I915_POWERWELL)
302 305
@@ -1992,7 +1995,7 @@ static const struct pci_device_id azx_ids[] = {
1992 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, 1995 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
1993 /* BayTrail */ 1996 /* BayTrail */
1994 { PCI_DEVICE(0x8086, 0x0f04), 1997 { PCI_DEVICE(0x8086, 0x0f04),
1995 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, 1998 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BAYTRAIL },
1996 /* Braswell */ 1999 /* Braswell */
1997 { PCI_DEVICE(0x8086, 0x2284), 2000 { PCI_DEVICE(0x8086, 0x2284),
1998 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BRASWELL }, 2001 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BRASWELL },
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index ee6230767c64..baaf7ed06875 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -582,8 +582,8 @@ static void print_conn_list(struct snd_info_buffer *buffer,
582 582
583 /* Get Cache connections info */ 583 /* Get Cache connections info */
584 cache_len = snd_hda_get_conn_list(codec, nid, &list); 584 cache_len = snd_hda_get_conn_list(codec, nid, &list);
585 if (cache_len != conn_len 585 if (cache_len >= 0 && (cache_len != conn_len ||
586 || memcmp(list, conn, conn_len)) { 586 memcmp(list, conn, conn_len) != 0)) {
587 snd_iprintf(buffer, " In-driver Connection: %d\n", cache_len); 587 snd_iprintf(buffer, " In-driver Connection: %d\n", cache_len);
588 if (cache_len > 0) { 588 if (cache_len > 0) {
589 snd_iprintf(buffer, " "); 589 snd_iprintf(buffer, " ");
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b18b9c67b262..06199e4e930f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4176,17 +4176,15 @@ static void alc_fixup_disable_aamix(struct hda_codec *codec,
4176 } 4176 }
4177} 4177}
4178 4178
4179static unsigned int alc_power_filter_xps13(struct hda_codec *codec, 4179static void alc_shutup_dell_xps13(struct hda_codec *codec)
4180 hda_nid_t nid,
4181 unsigned int power_state)
4182{ 4180{
4183 struct alc_spec *spec = codec->spec; 4181 struct alc_spec *spec = codec->spec;
4182 int hp_pin = spec->gen.autocfg.hp_pins[0];
4184 4183
4185 /* Avoid pop noises when headphones are plugged in */ 4184 /* Prevent pop noises when headphones are plugged in */
4186 if (spec->gen.hp_jack_present) 4185 snd_hda_codec_write(codec, hp_pin, 0,
4187 if (nid == codec->core.afg || nid == 0x02 || nid == 0x15) 4186 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
4188 return AC_PWRST_D0; 4187 msleep(20);
4189 return snd_hda_gen_path_power_filter(codec, nid, power_state);
4190} 4188}
4191 4189
4192static void alc_fixup_dell_xps13(struct hda_codec *codec, 4190static void alc_fixup_dell_xps13(struct hda_codec *codec,
@@ -4197,8 +4195,7 @@ static void alc_fixup_dell_xps13(struct hda_codec *codec,
4197 struct hda_input_mux *imux = &spec->gen.input_mux; 4195 struct hda_input_mux *imux = &spec->gen.input_mux;
4198 int i; 4196 int i;
4199 4197
4200 spec->shutup = alc_no_shutup; 4198 spec->shutup = alc_shutup_dell_xps13;
4201 codec->power_filter = alc_power_filter_xps13;
4202 4199
4203 /* Make the internal mic the default input source. */ 4200 /* Make the internal mic the default input source. */
4204 for (i = 0; i < imux->num_items; i++) { 4201 for (i = 0; i < imux->num_items; i++) {
@@ -5231,6 +5228,16 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
5231 {0x1b, 0x411111f0}, \ 5228 {0x1b, 0x411111f0}, \
5232 {0x1e, 0x411111f0} 5229 {0x1e, 0x411111f0}
5233 5230
5231#define ALC256_STANDARD_PINS \
5232 {0x12, 0x90a60140}, \
5233 {0x14, 0x90170110}, \
5234 {0x19, 0x411111f0}, \
5235 {0x1a, 0x411111f0}, \
5236 {0x1b, 0x411111f0}, \
5237 {0x1d, 0x40700001}, \
5238 {0x1e, 0x411111f0}, \
5239 {0x21, 0x02211020}
5240
5234#define ALC282_STANDARD_PINS \ 5241#define ALC282_STANDARD_PINS \
5235 {0x14, 0x90170110}, \ 5242 {0x14, 0x90170110}, \
5236 {0x18, 0x411111f0}, \ 5243 {0x18, 0x411111f0}, \
@@ -5331,15 +5338,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
5331 {0x1d, 0x40700001}, 5338 {0x1d, 0x40700001},
5332 {0x21, 0x02211050}), 5339 {0x21, 0x02211050}),
5333 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 5340 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5334 {0x12, 0x90a60140}, 5341 ALC256_STANDARD_PINS,
5335 {0x13, 0x40000000}, 5342 {0x13, 0x40000000}),
5336 {0x14, 0x90170110}, 5343 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5337 {0x19, 0x411111f0}, 5344 ALC256_STANDARD_PINS,
5338 {0x1a, 0x411111f0}, 5345 {0x13, 0x411111f0}),
5339 {0x1b, 0x411111f0},
5340 {0x1d, 0x40700001},
5341 {0x1e, 0x411111f0},
5342 {0x21, 0x02211020}),
5343 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, 5346 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
5344 {0x12, 0x90a60130}, 5347 {0x12, 0x90a60130},
5345 {0x13, 0x40000000}, 5348 {0x13, 0x40000000},
@@ -5667,6 +5670,8 @@ static int patch_alc269(struct hda_codec *codec)
5667 break; 5670 break;
5668 case 0x10ec0256: 5671 case 0x10ec0256:
5669 spec->codec_variant = ALC269_TYPE_ALC256; 5672 spec->codec_variant = ALC269_TYPE_ALC256;
5673 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
5674 alc_update_coef_idx(codec, 0x36, 1 << 13, 1 << 5); /* Switch pcbeep path to Line in path*/
5670 break; 5675 break;
5671 } 5676 }
5672 5677
@@ -5680,8 +5685,8 @@ static int patch_alc269(struct hda_codec *codec)
5680 if (err < 0) 5685 if (err < 0)
5681 goto error; 5686 goto error;
5682 5687
5683 if (!spec->gen.no_analog && spec->gen.beep_nid) 5688 if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid)
5684 set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); 5689 set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
5685 5690
5686 codec->patch_ops = alc_patch_ops; 5691 codec->patch_ops = alc_patch_ops;
5687 codec->patch_ops.stream_pm = snd_hda_gen_stream_pm; 5692 codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 749069aa6997..b120925223ae 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -3101,13 +3101,13 @@ static int snd_intel8x0_create(struct snd_card *card,
3101 chip->bmaddr = pci_iomap(pci, 3, 0); 3101 chip->bmaddr = pci_iomap(pci, 3, 0);
3102 else 3102 else
3103 chip->bmaddr = pci_iomap(pci, 1, 0); 3103 chip->bmaddr = pci_iomap(pci, 1, 0);
3104
3105 port_inited:
3104 if (!chip->bmaddr) { 3106 if (!chip->bmaddr) {
3105 dev_err(card->dev, "Controller space ioremap problem\n"); 3107 dev_err(card->dev, "Controller space ioremap problem\n");
3106 snd_intel8x0_free(chip); 3108 snd_intel8x0_free(chip);
3107 return -EIO; 3109 return -EIO;
3108 } 3110 }
3109
3110 port_inited:
3111 chip->bdbars_count = bdbars[device_type]; 3111 chip->bdbars_count = bdbars[device_type];
3112 3112
3113 /* initialize offsets */ 3113 /* initialize offsets */
diff --git a/sound/usb/format.c b/sound/usb/format.c
index 8bcc87cf5667..789d19ec035d 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -79,7 +79,10 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
79 format = 1 << UAC_FORMAT_TYPE_I_PCM; 79 format = 1 << UAC_FORMAT_TYPE_I_PCM;
80 } 80 }
81 if (format & (1 << UAC_FORMAT_TYPE_I_PCM)) { 81 if (format & (1 << UAC_FORMAT_TYPE_I_PCM)) {
82 if (chip->usb_id == USB_ID(0x0582, 0x0016) /* Edirol SD-90 */ && 82 if (((chip->usb_id == USB_ID(0x0582, 0x0016)) ||
83 /* Edirol SD-90 */
84 (chip->usb_id == USB_ID(0x0582, 0x000c))) &&
85 /* Roland SC-D70 */
83 sample_width == 24 && sample_bytes == 2) 86 sample_width == 24 && sample_bytes == 2)
84 sample_bytes = 3; 87 sample_bytes = 3;
85 else if (sample_width > sample_bytes * 8) { 88 else if (sample_width > sample_bytes * 8) {
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 07f984d5f516..2f6d3e9a1bcd 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -816,37 +816,11 @@ YAMAHA_DEVICE(0x7010, "UB99"),
816 .data = (const struct snd_usb_audio_quirk[]) { 816 .data = (const struct snd_usb_audio_quirk[]) {
817 { 817 {
818 .ifnum = 0, 818 .ifnum = 0,
819 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 819 .type = QUIRK_AUDIO_STANDARD_INTERFACE
820 .data = & (const struct audioformat) {
821 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
822 .channels = 2,
823 .iface = 0,
824 .altsetting = 1,
825 .altset_idx = 1,
826 .attributes = 0,
827 .endpoint = 0x01,
828 .ep_attr = 0x01,
829 .rates = SNDRV_PCM_RATE_CONTINUOUS,
830 .rate_min = 44100,
831 .rate_max = 44100,
832 }
833 }, 820 },
834 { 821 {
835 .ifnum = 1, 822 .ifnum = 1,
836 .type = QUIRK_AUDIO_FIXED_ENDPOINT, 823 .type = QUIRK_AUDIO_STANDARD_INTERFACE
837 .data = & (const struct audioformat) {
838 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
839 .channels = 2,
840 .iface = 1,
841 .altsetting = 1,
842 .altset_idx = 1,
843 .attributes = 0,
844 .endpoint = 0x81,
845 .ep_attr = 0x01,
846 .rates = SNDRV_PCM_RATE_CONTINUOUS,
847 .rate_min = 44100,
848 .rate_max = 44100,
849 }
850 }, 824 },
851 { 825 {
852 .ifnum = 2, 826 .ifnum = 2,