Commit 5f237425f352487a2e3fdef2f0557eedcd97d898

Authored by Linus Torvalds

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

Pull sound fixes from Takashi Iwai:
 "Here are a few more ASoC changes that have been gathered since rc1,
  but it's still fairly calm over all.  The only largish LOC is found in
  atmel driver, and it's just a removal of broken non-DT stuff.  The
  rest are all small driver-specific fixes, nothing to worry much"

* tag 'sound-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
  ALSA: hda - One more Dell macine needs DELL1_MIC_NO_PRESENCE quirk
  ALSA: opl3: small array underflow
  ALSA: line6: Clamp values correctly
  ALSA: msnd: add some missing curly braces
  ASoC: omap-pcm: Correct dma mask
  ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_of
  ASoC: sam9g20_wm8731: drop machine_is_xxx
  ALSA: dice: fix wrong offsets for Dice interface
  ALSA: oxfw: fix a condition and return code in start_stream()
  ASoC: OMAP: mcbsp: Fix CLKX and CLKR pinmux when used as inputs
  ASoC: rt5677: Correct the routing paths of that after IF1/2 DACx Mux
  ASoC: sta32x: fix register range in regmap.
  ASoC: rt5670: Set RT5670_IRQ_CTRL1 non volatile
  ASoC: Intel: reset the DSP while suspending
  ASoC: Intel: save and restore the CSR register
  ASoC: Intel: update MMX ID to 3
  ASoC: max98357a: Add missing header files
  ASoC: cirrus: tlv320aic23 needs I2C
  ASoC: Samsung: add missing I2C/SPI dependencies
  ASoC: rt5670: Fix the speaker mono output issue
  ...

Showing 23 changed files Side-by-side Diff

sound/drivers/opl3/opl3_midi.c
... ... @@ -105,6 +105,8 @@
105 105 int pitchbend = chan->midi_pitchbend;
106 106 int segment;
107 107  
  108 + if (pitchbend < -0x2000)
  109 + pitchbend = -0x2000;
108 110 if (pitchbend > 0x1FFF)
109 111 pitchbend = 0x1FFF;
110 112  
sound/firewire/dice/dice-interface.h
... ... @@ -299,23 +299,23 @@
299 299 #define RX_ISOCHRONOUS 0x008
300 300  
301 301 /*
302   - * Index of first quadlet to be interpreted; read/write. If > 0, that many
303   - * quadlets at the beginning of each data block will be ignored, and all the
304   - * audio and MIDI quadlets will follow.
305   - */
306   -#define RX_SEQ_START 0x00c
307   -
308   -/*
309 302 * The number of audio channels; read-only. There will be one quadlet per
310 303 * channel.
311 304 */
312   -#define RX_NUMBER_AUDIO 0x010
  305 +#define RX_NUMBER_AUDIO 0x00c
313 306  
314 307 /*
315 308 * The number of MIDI ports, 0-8; read-only. If > 0, there will be one
316 309 * additional quadlet in each data block, following the audio quadlets.
317 310 */
318   -#define RX_NUMBER_MIDI 0x014
  311 +#define RX_NUMBER_MIDI 0x010
  312 +
  313 +/*
  314 + * Index of first quadlet to be interpreted; read/write. If > 0, that many
  315 + * quadlets at the beginning of each data block will be ignored, and all the
  316 + * audio and MIDI quadlets will follow.
  317 + */
  318 +#define RX_SEQ_START 0x014
319 319  
320 320 /*
321 321 * Names of all audio channels; read-only. Quadlets are byte-swapped. Names
sound/firewire/dice/dice-proc.c
... ... @@ -99,9 +99,9 @@
99 99 } tx;
100 100 struct {
101 101 u32 iso;
102   - u32 seq_start;
103 102 u32 number_audio;
104 103 u32 number_midi;
  104 + u32 seq_start;
105 105 char names[RX_NAMES_SIZE];
106 106 u32 ac3_caps;
107 107 u32 ac3_enable;
108 108  
... ... @@ -204,10 +204,10 @@
204 204 break;
205 205 snd_iprintf(buffer, "rx %u:\n", stream);
206 206 snd_iprintf(buffer, " iso channel: %d\n", (int)buf.rx.iso);
207   - snd_iprintf(buffer, " sequence start: %u\n", buf.rx.seq_start);
208 207 snd_iprintf(buffer, " audio channels: %u\n",
209 208 buf.rx.number_audio);
210 209 snd_iprintf(buffer, " midi ports: %u\n", buf.rx.number_midi);
  210 + snd_iprintf(buffer, " sequence start: %u\n", buf.rx.seq_start);
211 211 if (quadlets >= 68) {
212 212 dice_proc_fixup_string(buf.rx.names, RX_NAMES_SIZE);
213 213 snd_iprintf(buffer, " names: %s\n", buf.rx.names);
sound/firewire/oxfw/oxfw-stream.c
... ... @@ -171,9 +171,10 @@
171 171 }
172 172  
173 173 /* Wait first packet */
174   - err = amdtp_stream_wait_callback(stream, CALLBACK_TIMEOUT);
175   - if (err < 0)
  174 + if (!amdtp_stream_wait_callback(stream, CALLBACK_TIMEOUT)) {
176 175 stop_stream(oxfw, stream);
  176 + err = -ETIMEDOUT;
  177 + }
177 178 end:
178 179 return err;
179 180 }
sound/isa/msnd/msnd_pinnacle_mixer.c
... ... @@ -306,11 +306,12 @@
306 306 spin_lock_init(&chip->mixer_lock);
307 307 strcpy(card->mixername, "MSND Pinnacle Mixer");
308 308  
309   - for (idx = 0; idx < ARRAY_SIZE(snd_msnd_controls); idx++)
  309 + for (idx = 0; idx < ARRAY_SIZE(snd_msnd_controls); idx++) {
310 310 err = snd_ctl_add(card,
311 311 snd_ctl_new1(snd_msnd_controls + idx, chip));
312 312 if (err < 0)
313 313 return err;
  314 + }
314 315  
315 316 return 0;
316 317 }
sound/pci/hda/patch_realtek.c
... ... @@ -5209,6 +5209,13 @@
5209 5209 {0x17, 0x40000000},
5210 5210 {0x1d, 0x40700001},
5211 5211 {0x21, 0x02211040}),
  5212 + SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
  5213 + ALC255_STANDARD_PINS,
  5214 + {0x12, 0x90a60170},
  5215 + {0x14, 0x90170140},
  5216 + {0x17, 0x40000000},
  5217 + {0x1d, 0x40700001},
  5218 + {0x21, 0x02211050}),
5212 5219 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
5213 5220 {0x12, 0x90a60130},
5214 5221 {0x13, 0x40000000},
sound/soc/atmel/sam9g20_wm8731.c
... ... @@ -46,8 +46,6 @@
46 46 #include <sound/pcm_params.h>
47 47 #include <sound/soc.h>
48 48  
49   -#include <asm/mach-types.h>
50   -
51 49 #include "../codecs/wm8731.h"
52 50 #include "atmel-pcm.h"
53 51 #include "atmel_ssc_dai.h"
... ... @@ -171,9 +169,7 @@
171 169 int ret;
172 170  
173 171 if (!np) {
174   - if (!(machine_is_at91sam9g20ek() ||
175   - machine_is_at91sam9g20ek_2mmc()))
176   - return -ENODEV;
  172 + return -ENODEV;
177 173 }
178 174  
179 175 ret = atmel_ssc_set_audio(0);
180 176  
181 177  
182 178  
183 179  
... ... @@ -210,39 +206,37 @@
210 206 card->dev = &pdev->dev;
211 207  
212 208 /* Parse device node info */
213   - if (np) {
214   - ret = snd_soc_of_parse_card_name(card, "atmel,model");
215   - if (ret)
216   - goto err;
  209 + ret = snd_soc_of_parse_card_name(card, "atmel,model");
  210 + if (ret)
  211 + goto err;
217 212  
218   - ret = snd_soc_of_parse_audio_routing(card,
219   - "atmel,audio-routing");
220   - if (ret)
221   - goto err;
  213 + ret = snd_soc_of_parse_audio_routing(card,
  214 + "atmel,audio-routing");
  215 + if (ret)
  216 + goto err;
222 217  
223   - /* Parse codec info */
224   - at91sam9g20ek_dai.codec_name = NULL;
225   - codec_np = of_parse_phandle(np, "atmel,audio-codec", 0);
226   - if (!codec_np) {
227   - dev_err(&pdev->dev, "codec info missing\n");
228   - return -EINVAL;
229   - }
230   - at91sam9g20ek_dai.codec_of_node = codec_np;
  218 + /* Parse codec info */
  219 + at91sam9g20ek_dai.codec_name = NULL;
  220 + codec_np = of_parse_phandle(np, "atmel,audio-codec", 0);
  221 + if (!codec_np) {
  222 + dev_err(&pdev->dev, "codec info missing\n");
  223 + return -EINVAL;
  224 + }
  225 + at91sam9g20ek_dai.codec_of_node = codec_np;
231 226  
232   - /* Parse dai and platform info */
233   - at91sam9g20ek_dai.cpu_dai_name = NULL;
234   - at91sam9g20ek_dai.platform_name = NULL;
235   - cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0);
236   - if (!cpu_np) {
237   - dev_err(&pdev->dev, "dai and pcm info missing\n");
238   - return -EINVAL;
239   - }
240   - at91sam9g20ek_dai.cpu_of_node = cpu_np;
241   - at91sam9g20ek_dai.platform_of_node = cpu_np;
242   -
243   - of_node_put(codec_np);
244   - of_node_put(cpu_np);
  227 + /* Parse dai and platform info */
  228 + at91sam9g20ek_dai.cpu_dai_name = NULL;
  229 + at91sam9g20ek_dai.platform_name = NULL;
  230 + cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0);
  231 + if (!cpu_np) {
  232 + dev_err(&pdev->dev, "dai and pcm info missing\n");
  233 + return -EINVAL;
245 234 }
  235 + at91sam9g20ek_dai.cpu_of_node = cpu_np;
  236 + at91sam9g20ek_dai.platform_of_node = cpu_np;
  237 +
  238 + of_node_put(codec_np);
  239 + of_node_put(cpu_np);
246 240  
247 241 ret = snd_soc_register_card(card);
248 242 if (ret) {
sound/soc/cirrus/Kconfig
... ... @@ -16,7 +16,7 @@
16 16  
17 17 config SND_EP93XX_SOC_SNAPPERCL15
18 18 tristate "SoC Audio support for Bluewater Systems Snapper CL15 module"
19   - depends on SND_EP93XX_SOC && MACH_SNAPPER_CL15
  19 + depends on SND_EP93XX_SOC && MACH_SNAPPER_CL15 && I2C
20 20 select SND_EP93XX_SOC_I2S
21 21 select SND_SOC_TLV320AIC23_I2C
22 22 help
sound/soc/codecs/Kconfig
... ... @@ -69,7 +69,7 @@
69 69 select SND_SOC_MAX98088 if I2C
70 70 select SND_SOC_MAX98090 if I2C
71 71 select SND_SOC_MAX98095 if I2C
72   - select SND_SOC_MAX98357A
  72 + select SND_SOC_MAX98357A if GPIOLIB
73 73 select SND_SOC_MAX9850 if I2C
74 74 select SND_SOC_MAX9768 if I2C
75 75 select SND_SOC_MAX9877 if I2C
sound/soc/codecs/max98357a.c
... ... @@ -12,9 +12,19 @@
12 12 * max98357a.c -- MAX98357A ALSA SoC Codec driver
13 13 */
14 14  
15   -#include <linux/module.h>
  15 +#include <linux/device.h>
  16 +#include <linux/err.h>
16 17 #include <linux/gpio.h>
  18 +#include <linux/gpio/consumer.h>
  19 +#include <linux/kernel.h>
  20 +#include <linux/mod_devicetable.h>
  21 +#include <linux/module.h>
  22 +#include <linux/of.h>
  23 +#include <linux/platform_device.h>
  24 +#include <sound/pcm.h>
17 25 #include <sound/soc.h>
  26 +#include <sound/soc-dai.h>
  27 +#include <sound/soc-dapm.h>
18 28  
19 29 #define DRV_NAME "max98357a"
20 30  
sound/soc/codecs/rt5670.c
... ... @@ -225,7 +225,6 @@
225 225 case RT5670_ADC_EQ_CTRL1:
226 226 case RT5670_EQ_CTRL1:
227 227 case RT5670_ALC_CTRL_1:
228   - case RT5670_IRQ_CTRL1:
229 228 case RT5670_IRQ_CTRL2:
230 229 case RT5670_INT_IRQ_ST:
231 230 case RT5670_IL_CMD:
... ... @@ -2702,6 +2701,12 @@
2702 2701 msleep(100);
2703 2702  
2704 2703 regmap_write(rt5670->regmap, RT5670_RESET, 0);
  2704 +
  2705 + regmap_read(rt5670->regmap, RT5670_VENDOR_ID, &val);
  2706 + if (val >= 4)
  2707 + regmap_write(rt5670->regmap, RT5670_GPIO_CTRL3, 0x0980);
  2708 + else
  2709 + regmap_write(rt5670->regmap, RT5670_GPIO_CTRL3, 0x0d00);
2705 2710  
2706 2711 ret = regmap_register_patch(rt5670->regmap, init_list,
2707 2712 ARRAY_SIZE(init_list));
sound/soc/codecs/rt5677.c
... ... @@ -3284,8 +3284,8 @@
3284 3284 { "IB45 Bypass Mux", "Bypass", "IB45 Mux" },
3285 3285 { "IB45 Bypass Mux", "Pass SRC", "IB45 Mux" },
3286 3286  
3287   - { "IB6 Mux", "IF1 DAC 6", "IF1 DAC6" },
3288   - { "IB6 Mux", "IF2 DAC 6", "IF2 DAC6" },
  3287 + { "IB6 Mux", "IF1 DAC 6", "IF1 DAC6 Mux" },
  3288 + { "IB6 Mux", "IF2 DAC 6", "IF2 DAC6 Mux" },
3289 3289 { "IB6 Mux", "SLB DAC 6", "SLB DAC6" },
3290 3290 { "IB6 Mux", "STO4 ADC MIX L", "Stereo4 ADC MIXL" },
3291 3291 { "IB6 Mux", "IF4 DAC L", "IF4 DAC L" },
... ... @@ -3293,8 +3293,8 @@
3293 3293 { "IB6 Mux", "STO2 ADC MIX L", "Stereo2 ADC MIXL" },
3294 3294 { "IB6 Mux", "STO3 ADC MIX L", "Stereo3 ADC MIXL" },
3295 3295  
3296   - { "IB7 Mux", "IF1 DAC 7", "IF1 DAC7" },
3297   - { "IB7 Mux", "IF2 DAC 7", "IF2 DAC7" },
  3296 + { "IB7 Mux", "IF1 DAC 7", "IF1 DAC7 Mux" },
  3297 + { "IB7 Mux", "IF2 DAC 7", "IF2 DAC7 Mux" },
3298 3298 { "IB7 Mux", "SLB DAC 7", "SLB DAC7" },
3299 3299 { "IB7 Mux", "STO4 ADC MIX R", "Stereo4 ADC MIXR" },
3300 3300 { "IB7 Mux", "IF4 DAC R", "IF4 DAC R" },
3301 3301  
... ... @@ -3635,15 +3635,15 @@
3635 3635 { "DAC1 FS", NULL, "DAC1 MIXL" },
3636 3636 { "DAC1 FS", NULL, "DAC1 MIXR" },
3637 3637  
3638   - { "DAC2 L Mux", "IF1 DAC 2", "IF1 DAC2" },
3639   - { "DAC2 L Mux", "IF2 DAC 2", "IF2 DAC2" },
  3638 + { "DAC2 L Mux", "IF1 DAC 2", "IF1 DAC2 Mux" },
  3639 + { "DAC2 L Mux", "IF2 DAC 2", "IF2 DAC2 Mux" },
3640 3640 { "DAC2 L Mux", "IF3 DAC L", "IF3 DAC L" },
3641 3641 { "DAC2 L Mux", "IF4 DAC L", "IF4 DAC L" },
3642 3642 { "DAC2 L Mux", "SLB DAC 2", "SLB DAC2" },
3643 3643 { "DAC2 L Mux", "OB 2", "OutBound2" },
3644 3644  
3645   - { "DAC2 R Mux", "IF1 DAC 3", "IF1 DAC3" },
3646   - { "DAC2 R Mux", "IF2 DAC 3", "IF2 DAC3" },
  3645 + { "DAC2 R Mux", "IF1 DAC 3", "IF1 DAC3 Mux" },
  3646 + { "DAC2 R Mux", "IF2 DAC 3", "IF2 DAC3 Mux" },
3647 3647 { "DAC2 R Mux", "IF3 DAC R", "IF3 DAC R" },
3648 3648 { "DAC2 R Mux", "IF4 DAC R", "IF4 DAC R" },
3649 3649 { "DAC2 R Mux", "SLB DAC 3", "SLB DAC3" },
3650 3650  
3651 3651  
3652 3652  
... ... @@ -3651,29 +3651,29 @@
3651 3651 { "DAC2 R Mux", "Haptic Generator", "Haptic Generator" },
3652 3652 { "DAC2 R Mux", "VAD ADC", "VAD ADC Mux" },
3653 3653  
3654   - { "DAC3 L Mux", "IF1 DAC 4", "IF1 DAC4" },
3655   - { "DAC3 L Mux", "IF2 DAC 4", "IF2 DAC4" },
  3654 + { "DAC3 L Mux", "IF1 DAC 4", "IF1 DAC4 Mux" },
  3655 + { "DAC3 L Mux", "IF2 DAC 4", "IF2 DAC4 Mux" },
3656 3656 { "DAC3 L Mux", "IF3 DAC L", "IF3 DAC L" },
3657 3657 { "DAC3 L Mux", "IF4 DAC L", "IF4 DAC L" },
3658 3658 { "DAC3 L Mux", "SLB DAC 4", "SLB DAC4" },
3659 3659 { "DAC3 L Mux", "OB 4", "OutBound4" },
3660 3660  
3661   - { "DAC3 R Mux", "IF1 DAC 5", "IF1 DAC4" },
3662   - { "DAC3 R Mux", "IF2 DAC 5", "IF2 DAC4" },
  3661 + { "DAC3 R Mux", "IF1 DAC 5", "IF1 DAC5 Mux" },
  3662 + { "DAC3 R Mux", "IF2 DAC 5", "IF2 DAC5 Mux" },
3663 3663 { "DAC3 R Mux", "IF3 DAC R", "IF3 DAC R" },
3664 3664 { "DAC3 R Mux", "IF4 DAC R", "IF4 DAC R" },
3665 3665 { "DAC3 R Mux", "SLB DAC 5", "SLB DAC5" },
3666 3666 { "DAC3 R Mux", "OB 5", "OutBound5" },
3667 3667  
3668   - { "DAC4 L Mux", "IF1 DAC 6", "IF1 DAC6" },
3669   - { "DAC4 L Mux", "IF2 DAC 6", "IF2 DAC6" },
  3668 + { "DAC4 L Mux", "IF1 DAC 6", "IF1 DAC6 Mux" },
  3669 + { "DAC4 L Mux", "IF2 DAC 6", "IF2 DAC6 Mux" },
3670 3670 { "DAC4 L Mux", "IF3 DAC L", "IF3 DAC L" },
3671 3671 { "DAC4 L Mux", "IF4 DAC L", "IF4 DAC L" },
3672 3672 { "DAC4 L Mux", "SLB DAC 6", "SLB DAC6" },
3673 3673 { "DAC4 L Mux", "OB 6", "OutBound6" },
3674 3674  
3675   - { "DAC4 R Mux", "IF1 DAC 7", "IF1 DAC7" },
3676   - { "DAC4 R Mux", "IF2 DAC 7", "IF2 DAC7" },
  3675 + { "DAC4 R Mux", "IF1 DAC 7", "IF1 DAC7 Mux" },
  3676 + { "DAC4 R Mux", "IF2 DAC 7", "IF2 DAC7 Mux" },
3677 3677 { "DAC4 R Mux", "IF3 DAC R", "IF3 DAC R" },
3678 3678 { "DAC4 R Mux", "IF4 DAC R", "IF4 DAC R" },
3679 3679 { "DAC4 R Mux", "SLB DAC 7", "SLB DAC7" },
sound/soc/codecs/sta32x.c
... ... @@ -106,13 +106,11 @@
106 106 };
107 107  
108 108 static const struct regmap_range sta32x_write_regs_range[] = {
109   - regmap_reg_range(STA32X_CONFA, STA32X_AUTO2),
110   - regmap_reg_range(STA32X_C1CFG, STA32X_FDRC2),
  109 + regmap_reg_range(STA32X_CONFA, STA32X_FDRC2),
111 110 };
112 111  
113 112 static const struct regmap_range sta32x_read_regs_range[] = {
114   - regmap_reg_range(STA32X_CONFA, STA32X_AUTO2),
115   - regmap_reg_range(STA32X_C1CFG, STA32X_FDRC2),
  113 + regmap_reg_range(STA32X_CONFA, STA32X_FDRC2),
116 114 };
117 115  
118 116 static const struct regmap_range sta32x_volatile_regs_range[] = {
sound/soc/fsl/fsl_ssi.c
... ... @@ -603,16 +603,19 @@
603 603 factor = (div2 + 1) * (7 * psr + 1) * 2;
604 604  
605 605 for (i = 0; i < 255; i++) {
606   - /* The bclk rate must be smaller than 1/5 sysclk rate */
607   - if (factor * (i + 1) < 5)
608   - continue;
609   -
610 606 tmprate = freq * factor * (i + 2);
611 607  
612 608 if (baudclk_is_used)
613 609 clkrate = clk_get_rate(ssi_private->baudclk);
614 610 else
615 611 clkrate = clk_round_rate(ssi_private->baudclk, tmprate);
  612 +
  613 + /*
  614 + * Hardware limitation: The bclk rate must be
  615 + * never greater than 1/5 IPG clock rate
  616 + */
  617 + if (clkrate * 5 > clk_get_rate(ssi_private->clk))
  618 + continue;
616 619  
617 620 clkrate /= factor;
618 621 afreq = clkrate / (i + 1);
sound/soc/generic/simple-card.c
... ... @@ -372,6 +372,11 @@
372 372 strlen(dai_link->cpu_dai_name) +
373 373 strlen(dai_link->codec_dai_name) + 2,
374 374 GFP_KERNEL);
  375 + if (!name) {
  376 + ret = -ENOMEM;
  377 + goto dai_link_of_err;
  378 + }
  379 +
375 380 sprintf(name, "%s-%s", dai_link->cpu_dai_name,
376 381 dai_link->codec_dai_name);
377 382 dai_link->name = dai_link->stream_name = name;
sound/soc/intel/sst-atom-controls.h
... ... @@ -150,7 +150,7 @@
150 150  
151 151 enum sst_task {
152 152 SST_TASK_SBA = 1,
153   - SST_TASK_MMX,
  153 + SST_TASK_MMX = 3,
154 154 };
155 155  
156 156 enum sst_type {
sound/soc/intel/sst/sst.c
... ... @@ -350,8 +350,10 @@
350 350  
351 351 spin_lock_irqsave(&ctx->ipc_spin_lock, irq_flags);
352 352  
353   - shim_regs->imrx = sst_shim_read64(shim, SST_IMRX),
  353 + shim_regs->imrx = sst_shim_read64(shim, SST_IMRX);
  354 + shim_regs->csr = sst_shim_read64(shim, SST_CSR);
354 355  
  356 +
355 357 spin_unlock_irqrestore(&ctx->ipc_spin_lock, irq_flags);
356 358 }
357 359  
... ... @@ -367,6 +369,7 @@
367 369 */
368 370 spin_lock_irqsave(&ctx->ipc_spin_lock, irq_flags);
369 371 sst_shim_write64(shim, SST_IMRX, shim_regs->imrx),
  372 + sst_shim_write64(shim, SST_CSR, shim_regs->csr),
370 373 spin_unlock_irqrestore(&ctx->ipc_spin_lock, irq_flags);
371 374 }
372 375  
... ... @@ -379,6 +382,10 @@
379 382 * initially active. So change the state to active before
380 383 * enabling the pm
381 384 */
  385 +
  386 + if (!acpi_disabled)
  387 + pm_runtime_set_active(ctx->dev);
  388 +
382 389 pm_runtime_enable(ctx->dev);
383 390  
384 391 if (acpi_disabled)
... ... @@ -409,6 +416,7 @@
409 416 synchronize_irq(ctx->irq_num);
410 417 flush_workqueue(ctx->post_msg_wq);
411 418  
  419 + ctx->ops->reset(ctx);
412 420 /* save the shim registers because PMC doesn't save state */
413 421 sst_save_shim64(ctx, ctx->shim, ctx->shim_regs64);
414 422  
sound/soc/omap/omap-hdmi-audio.c
... ... @@ -352,6 +352,9 @@
352 352 return ret;
353 353  
354 354 card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL);
  355 + if (!card)
  356 + return -ENOMEM;
  357 +
355 358 card->name = devm_kasprintf(dev, GFP_KERNEL,
356 359 "HDMI %s", dev_name(ad->dssdev));
357 360 card->owner = THIS_MODULE;
sound/soc/omap/omap-mcbsp.c
... ... @@ -530,8 +530,19 @@
530 530  
531 531 case OMAP_MCBSP_SYSCLK_CLKX_EXT:
532 532 regs->srgr2 |= CLKSM;
  533 + regs->pcr0 |= SCLKME;
  534 + /*
  535 + * If McBSP is master but yet the CLKX/CLKR pin drives the SRG,
  536 + * disable output on those pins. This enables to inject the
  537 + * reference clock through CLKX/CLKR. For this to work
  538 + * set_dai_sysclk() _needs_ to be called after set_dai_fmt().
  539 + */
  540 + regs->pcr0 &= ~CLKXM;
  541 + break;
533 542 case OMAP_MCBSP_SYSCLK_CLKR_EXT:
534 543 regs->pcr0 |= SCLKME;
  544 + /* Disable ouput on CLKR pin in master mode */
  545 + regs->pcr0 &= ~CLKRM;
535 546 break;
536 547 default:
537 548 err = -ENODEV;
sound/soc/omap/omap-pcm.c
... ... @@ -201,7 +201,7 @@
201 201 struct snd_pcm *pcm = rtd->pcm;
202 202 int ret;
203 203  
204   - ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(64));
  204 + ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
205 205 if (ret)
206 206 return ret;
207 207  
sound/soc/samsung/Kconfig
... ... @@ -174,7 +174,7 @@
174 174  
175 175 config SND_SOC_SPEYSIDE
176 176 tristate "Audio support for Wolfson Speyside"
177   - depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410
  177 + depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && I2C && SPI_MASTER
178 178 select SND_SAMSUNG_I2S
179 179 select SND_SOC_WM8996
180 180 select SND_SOC_WM9081
... ... @@ -189,7 +189,7 @@
189 189  
190 190 config SND_SOC_BELLS
191 191 tristate "Audio support for Wolfson Bells"
192   - depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && MFD_ARIZONA
  192 + depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && MFD_ARIZONA && I2C && SPI_MASTER
193 193 select SND_SAMSUNG_I2S
194 194 select SND_SOC_WM5102
195 195 select SND_SOC_WM5110
... ... @@ -206,7 +206,7 @@
206 206  
207 207 config SND_SOC_LITTLEMILL
208 208 tristate "Audio support for Wolfson Littlemill"
209   - depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410
  209 + depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && I2C
210 210 select SND_SAMSUNG_I2S
211 211 select MFD_WM8994
212 212 select SND_SOC_WM8994
... ... @@ -223,7 +223,7 @@
223 223  
224 224 config SND_SOC_ODROIDX2
225 225 tristate "Audio support for Odroid-X2 and Odroid-U3"
226   - depends on SND_SOC_SAMSUNG
  226 + depends on SND_SOC_SAMSUNG && I2C
227 227 select SND_SOC_MAX98090
228 228 select SND_SAMSUNG_I2S
229 229 help
... ... @@ -231,7 +231,7 @@
231 231  
232 232 config SND_SOC_ARNDALE_RT5631_ALC5631
233 233 tristate "Audio support for RT5631(ALC5631) on Arndale Board"
234   - depends on SND_SOC_SAMSUNG
  234 + depends on SND_SOC_SAMSUNG && I2C
235 235 select SND_SAMSUNG_I2S
236 236 select SND_SOC_RT5631
sound/soc/sh/rcar/core.c
... ... @@ -1252,6 +1252,8 @@
1252 1252 goto exit_snd_probe;
1253 1253 }
1254 1254  
  1255 + dev_set_drvdata(dev, priv);
  1256 +
1255 1257 /*
1256 1258 * asoc register
1257 1259 */
... ... @@ -1267,8 +1269,6 @@
1267 1269 dev_err(dev, "cannot snd dai register\n");
1268 1270 goto exit_snd_soc;
1269 1271 }
1270   -
1271   - dev_set_drvdata(dev, priv);
1272 1272  
1273 1273 pm_runtime_enable(dev);
1274 1274  
sound/usb/line6/playback.c
... ... @@ -39,7 +39,7 @@
39 39 for (; p < buf_end; ++p) {
40 40 short pv = le16_to_cpu(*p);
41 41 int val = (pv * volume[chn & 1]) >> 8;
42   - pv = clamp(val, 0x7fff, -0x8000);
  42 + pv = clamp(val, -0x8000, 0x7fff);
43 43 *p = cpu_to_le16(pv);
44 44 ++chn;
45 45 }
... ... @@ -54,7 +54,7 @@
54 54  
55 55 val = p[0] + (p[1] << 8) + ((signed char)p[2] << 16);
56 56 val = (val * volume[chn & 1]) >> 8;
57   - val = clamp(val, 0x7fffff, -0x800000);
  57 + val = clamp(val, -0x800000, 0x7fffff);
58 58 p[0] = val;
59 59 p[1] = val >> 8;
60 60 p[2] = val >> 16;
... ... @@ -126,7 +126,7 @@
126 126 short pov = le16_to_cpu(*po);
127 127 short piv = le16_to_cpu(*pi);
128 128 int val = pov + ((piv * volume) >> 8);
129   - pov = clamp(val, 0x7fff, -0x8000);
  129 + pov = clamp(val, -0x8000, 0x7fff);
130 130 *po = cpu_to_le16(pov);
131 131 }
132 132 }