diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-16 16:06:30 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-16 16:06:30 -0500 |
commit | 0d9d349d8788d30f3fc3bb39279c370f94d9dbec (patch) | |
tree | 874f301d180bd2a80dee68ec4caf79ff64f9bed9 /sound | |
parent | cba1c07377132fb87b2c73b395ef386da7e03f60 (diff) | |
parent | 145830dfb005961cb507a578c9d2e7622f0b3716 (diff) |
Merge commit origin/master into drm-intel-next
Conflicts are getting out of hand, and now we have to shuffle even
more in -next which was also shuffled in -fixes (the call for
drm_mode_config_reset needs to move yet again).
So do a proper backmerge. I wanted to wait with this for the 3.13
relaese, but alas let's just do this now.
Conflicts:
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c
Besides the conflict around the forcewake get/put (where we chaged the
called function in -fixes and added a new parameter in -next) code all
the current conflicts are of the adjacent lines changed type.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_lib.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.c | 47 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.h | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 10 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 5 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 15 | ||||
-rw-r--r-- | sound/soc/atmel/atmel_ssc_dai.c | 30 | ||||
-rw-r--r-- | sound/soc/atmel/sam9x5_wm8731.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm5110.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8904.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 13 | ||||
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 10 | ||||
-rw-r--r-- | sound/soc/fsl/imx-wm8962.c | 2 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 24 | ||||
-rw-r--r-- | sound/soc/soc-generic-dmaengine-pcm.c | 38 | ||||
-rw-r--r-- | sound/soc/soc-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/tegra/tegra20_i2s.c | 6 | ||||
-rw-r--r-- | sound/soc/tegra/tegra20_spdif.c | 10 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_i2s.c | 6 | ||||
-rw-r--r-- | sound/usb/mixer_quirks.c | 2 |
22 files changed, 189 insertions, 50 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 6e03b465e44e..a2104671f51d 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -1937,6 +1937,8 @@ static int wait_for_avail(struct snd_pcm_substream *substream, | |||
1937 | case SNDRV_PCM_STATE_DISCONNECTED: | 1937 | case SNDRV_PCM_STATE_DISCONNECTED: |
1938 | err = -EBADFD; | 1938 | err = -EBADFD; |
1939 | goto _endloop; | 1939 | goto _endloop; |
1940 | case SNDRV_PCM_STATE_PAUSED: | ||
1941 | continue; | ||
1940 | } | 1942 | } |
1941 | if (!tout) { | 1943 | if (!tout) { |
1942 | snd_printd("%s write error (DMA or IRQ trouble?)\n", | 1944 | snd_printd("%s write error (DMA or IRQ trouble?)\n", |
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index c4671d00babd..c7f6d1cab606 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -474,6 +474,20 @@ static void invalidate_nid_path(struct hda_codec *codec, int idx) | |||
474 | memset(path, 0, sizeof(*path)); | 474 | memset(path, 0, sizeof(*path)); |
475 | } | 475 | } |
476 | 476 | ||
477 | /* return a DAC if paired to the given pin by codec driver */ | ||
478 | static hda_nid_t get_preferred_dac(struct hda_codec *codec, hda_nid_t pin) | ||
479 | { | ||
480 | struct hda_gen_spec *spec = codec->spec; | ||
481 | const hda_nid_t *list = spec->preferred_dacs; | ||
482 | |||
483 | if (!list) | ||
484 | return 0; | ||
485 | for (; *list; list += 2) | ||
486 | if (*list == pin) | ||
487 | return list[1]; | ||
488 | return 0; | ||
489 | } | ||
490 | |||
477 | /* look for an empty DAC slot */ | 491 | /* look for an empty DAC slot */ |
478 | static hda_nid_t look_for_dac(struct hda_codec *codec, hda_nid_t pin, | 492 | static hda_nid_t look_for_dac(struct hda_codec *codec, hda_nid_t pin, |
479 | bool is_digital) | 493 | bool is_digital) |
@@ -1192,7 +1206,14 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs, | |||
1192 | continue; | 1206 | continue; |
1193 | } | 1207 | } |
1194 | 1208 | ||
1195 | dacs[i] = look_for_dac(codec, pin, false); | 1209 | dacs[i] = get_preferred_dac(codec, pin); |
1210 | if (dacs[i]) { | ||
1211 | if (is_dac_already_used(codec, dacs[i])) | ||
1212 | badness += bad->shared_primary; | ||
1213 | } | ||
1214 | |||
1215 | if (!dacs[i]) | ||
1216 | dacs[i] = look_for_dac(codec, pin, false); | ||
1196 | if (!dacs[i] && !i) { | 1217 | if (!dacs[i] && !i) { |
1197 | /* try to steal the DAC of surrounds for the front */ | 1218 | /* try to steal the DAC of surrounds for the front */ |
1198 | for (j = 1; j < num_outs; j++) { | 1219 | for (j = 1; j < num_outs; j++) { |
@@ -4297,6 +4318,26 @@ static unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec, | |||
4297 | return AC_PWRST_D3; | 4318 | return AC_PWRST_D3; |
4298 | } | 4319 | } |
4299 | 4320 | ||
4321 | /* mute all aamix inputs initially; parse up to the first leaves */ | ||
4322 | static void mute_all_mixer_nid(struct hda_codec *codec, hda_nid_t mix) | ||
4323 | { | ||
4324 | int i, nums; | ||
4325 | const hda_nid_t *conn; | ||
4326 | bool has_amp; | ||
4327 | |||
4328 | nums = snd_hda_get_conn_list(codec, mix, &conn); | ||
4329 | has_amp = nid_has_mute(codec, mix, HDA_INPUT); | ||
4330 | for (i = 0; i < nums; i++) { | ||
4331 | if (has_amp) | ||
4332 | snd_hda_codec_amp_stereo(codec, mix, | ||
4333 | HDA_INPUT, i, | ||
4334 | 0xff, HDA_AMP_MUTE); | ||
4335 | else if (nid_has_volume(codec, conn[i], HDA_OUTPUT)) | ||
4336 | snd_hda_codec_amp_stereo(codec, conn[i], | ||
4337 | HDA_OUTPUT, 0, | ||
4338 | 0xff, HDA_AMP_MUTE); | ||
4339 | } | ||
4340 | } | ||
4300 | 4341 | ||
4301 | /* | 4342 | /* |
4302 | * Parse the given BIOS configuration and set up the hda_gen_spec | 4343 | * Parse the given BIOS configuration and set up the hda_gen_spec |
@@ -4435,6 +4476,10 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec, | |||
4435 | } | 4476 | } |
4436 | } | 4477 | } |
4437 | 4478 | ||
4479 | /* mute all aamix input initially */ | ||
4480 | if (spec->mixer_nid) | ||
4481 | mute_all_mixer_nid(codec, spec->mixer_nid); | ||
4482 | |||
4438 | dig_only: | 4483 | dig_only: |
4439 | parse_digital(codec); | 4484 | parse_digital(codec); |
4440 | 4485 | ||
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index 7e45cb44d151..0929a06df812 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h | |||
@@ -249,6 +249,9 @@ struct hda_gen_spec { | |||
249 | const struct badness_table *main_out_badness; | 249 | const struct badness_table *main_out_badness; |
250 | const struct badness_table *extra_out_badness; | 250 | const struct badness_table *extra_out_badness; |
251 | 251 | ||
252 | /* preferred pin/DAC pairs; an array of paired NIDs */ | ||
253 | const hda_nid_t *preferred_dacs; | ||
254 | |||
252 | /* loopback mixing mode */ | 255 | /* loopback mixing mode */ |
253 | bool aamix_mode; | 256 | bool aamix_mode; |
254 | 257 | ||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 27aa14007cbd..956871d8b3d2 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -3433,6 +3433,10 @@ static void check_probe_mask(struct azx *chip, int dev) | |||
3433 | * white/black-list for enable_msi | 3433 | * white/black-list for enable_msi |
3434 | */ | 3434 | */ |
3435 | static struct snd_pci_quirk msi_black_list[] = { | 3435 | static struct snd_pci_quirk msi_black_list[] = { |
3436 | SND_PCI_QUIRK(0x103c, 0x2191, "HP", 0), /* AMD Hudson */ | ||
3437 | SND_PCI_QUIRK(0x103c, 0x2192, "HP", 0), /* AMD Hudson */ | ||
3438 | SND_PCI_QUIRK(0x103c, 0x21f7, "HP", 0), /* AMD Hudson */ | ||
3439 | SND_PCI_QUIRK(0x103c, 0x21fa, "HP", 0), /* AMD Hudson */ | ||
3436 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ | 3440 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ |
3437 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ | 3441 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ |
3438 | SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ | 3442 | SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index cac015be3325..699262a3e07a 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -340,6 +340,14 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
340 | { | 340 | { |
341 | int err; | 341 | int err; |
342 | struct ad198x_spec *spec; | 342 | struct ad198x_spec *spec; |
343 | static hda_nid_t preferred_pairs[] = { | ||
344 | 0x1a, 0x03, | ||
345 | 0x1b, 0x03, | ||
346 | 0x1c, 0x04, | ||
347 | 0x1d, 0x05, | ||
348 | 0x1e, 0x03, | ||
349 | 0 | ||
350 | }; | ||
343 | 351 | ||
344 | err = alloc_ad_spec(codec); | 352 | err = alloc_ad_spec(codec); |
345 | if (err < 0) | 353 | if (err < 0) |
@@ -360,6 +368,8 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
360 | * So, let's disable the shared stream. | 368 | * So, let's disable the shared stream. |
361 | */ | 369 | */ |
362 | spec->gen.multiout.no_share_stream = 1; | 370 | spec->gen.multiout.no_share_stream = 1; |
371 | /* give fixed DAC/pin pairs */ | ||
372 | spec->gen.preferred_dacs = preferred_pairs; | ||
363 | 373 | ||
364 | /* AD1986A can't manage the dynamic pin on/off smoothly */ | 374 | /* AD1986A can't manage the dynamic pin on/off smoothly */ |
365 | spec->gen.auto_mute_via_amp = 1; | 375 | spec->gen.auto_mute_via_amp = 1; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 1f2717f817a0..3fbf2883e06e 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -2936,7 +2936,6 @@ static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
2936 | SND_PCI_QUIRK(0x1028, 0x0401, "Dell Vostro 1014", CXT5066_DELL_VOSTRO), | 2936 | SND_PCI_QUIRK(0x1028, 0x0401, "Dell Vostro 1014", CXT5066_DELL_VOSTRO), |
2937 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), | 2937 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), |
2938 | SND_PCI_QUIRK(0x1028, 0x050f, "Dell Inspiron", CXT5066_IDEAPAD), | 2938 | SND_PCI_QUIRK(0x1028, 0x050f, "Dell Inspiron", CXT5066_IDEAPAD), |
2939 | SND_PCI_QUIRK(0x1028, 0x0510, "Dell Vostro", CXT5066_IDEAPAD), | ||
2940 | SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), | 2939 | SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), |
2941 | SND_PCI_QUIRK(0x1043, 0x13f3, "Asus A52J", CXT5066_ASUS), | 2940 | SND_PCI_QUIRK(0x1043, 0x13f3, "Asus A52J", CXT5066_ASUS), |
2942 | SND_PCI_QUIRK(0x1043, 0x1643, "Asus K52JU", CXT5066_ASUS), | 2941 | SND_PCI_QUIRK(0x1043, 0x1643, "Asus K52JU", CXT5066_ASUS), |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index c4a66ef6cf6f..f281c8068557 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -2337,8 +2337,9 @@ static int simple_playback_build_controls(struct hda_codec *codec) | |||
2337 | int err; | 2337 | int err; |
2338 | 2338 | ||
2339 | per_cvt = get_cvt(spec, 0); | 2339 | per_cvt = get_cvt(spec, 0); |
2340 | err = snd_hda_create_spdif_out_ctls(codec, per_cvt->cvt_nid, | 2340 | err = snd_hda_create_dig_out_ctls(codec, per_cvt->cvt_nid, |
2341 | per_cvt->cvt_nid); | 2341 | per_cvt->cvt_nid, |
2342 | HDA_PCM_TYPE_HDMI); | ||
2342 | if (err < 0) | 2343 | if (err < 0) |
2343 | return err; | 2344 | return err; |
2344 | return simple_hdmi_build_jack(codec, 0); | 2345 | return simple_hdmi_build_jack(codec, 0); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c5ea483d7559..c5646941539a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3849,6 +3849,7 @@ enum { | |||
3849 | ALC269_FIXUP_ASUS_X101, | 3849 | ALC269_FIXUP_ASUS_X101, |
3850 | ALC271_FIXUP_AMIC_MIC2, | 3850 | ALC271_FIXUP_AMIC_MIC2, |
3851 | ALC271_FIXUP_HP_GATE_MIC_JACK, | 3851 | ALC271_FIXUP_HP_GATE_MIC_JACK, |
3852 | ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, | ||
3852 | ALC269_FIXUP_ACER_AC700, | 3853 | ALC269_FIXUP_ACER_AC700, |
3853 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, | 3854 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, |
3854 | ALC269VB_FIXUP_ASUS_ZENBOOK, | 3855 | ALC269VB_FIXUP_ASUS_ZENBOOK, |
@@ -4111,6 +4112,12 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4111 | .chained = true, | 4112 | .chained = true, |
4112 | .chain_id = ALC271_FIXUP_AMIC_MIC2, | 4113 | .chain_id = ALC271_FIXUP_AMIC_MIC2, |
4113 | }, | 4114 | }, |
4115 | [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572] = { | ||
4116 | .type = HDA_FIXUP_FUNC, | ||
4117 | .v.func = alc269_fixup_limit_int_mic_boost, | ||
4118 | .chained = true, | ||
4119 | .chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK, | ||
4120 | }, | ||
4114 | [ALC269_FIXUP_ACER_AC700] = { | 4121 | [ALC269_FIXUP_ACER_AC700] = { |
4115 | .type = HDA_FIXUP_PINS, | 4122 | .type = HDA_FIXUP_PINS, |
4116 | .v.pins = (const struct hda_pintbl[]) { | 4123 | .v.pins = (const struct hda_pintbl[]) { |
@@ -4208,6 +4215,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4208 | SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), | 4215 | SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), |
4209 | SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), | 4216 | SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), |
4210 | SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), | 4217 | SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), |
4218 | SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), | ||
4211 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 4219 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
4212 | SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4220 | SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4213 | SND_PCI_QUIRK(0x1028, 0x05be, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4221 | SND_PCI_QUIRK(0x1028, 0x05be, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
@@ -4239,12 +4247,16 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4239 | SND_PCI_QUIRK(0x1028, 0x0606, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4247 | SND_PCI_QUIRK(0x1028, 0x0606, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4240 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4248 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4241 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4249 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4250 | SND_PCI_QUIRK(0x1028, 0x0610, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4242 | SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4251 | SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4243 | SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4252 | SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4244 | SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), | 4253 | SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), |
4245 | SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4254 | SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4255 | SND_PCI_QUIRK(0x1028, 0x0629, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4246 | SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS), | 4256 | SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS), |
4257 | SND_PCI_QUIRK(0x1028, 0x063e, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4247 | SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4258 | SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4259 | SND_PCI_QUIRK(0x1028, 0x0640, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4248 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4260 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4249 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4261 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4250 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), | 4262 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |
@@ -5034,8 +5046,11 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { | |||
5034 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 5046 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
5035 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5047 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5036 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5048 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5049 | SND_PCI_QUIRK(0x1028, 0x0623, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
5050 | SND_PCI_QUIRK(0x1028, 0x0624, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
5037 | SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5051 | SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5038 | SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5052 | SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5053 | SND_PCI_QUIRK(0x1028, 0x0628, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
5039 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), | 5054 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), |
5040 | SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A_CHMAP), | 5055 | SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A_CHMAP), |
5041 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP), | 5056 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP), |
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 8697cedccd21..1ead3c977a51 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
@@ -648,7 +648,7 @@ static int atmel_ssc_prepare(struct snd_pcm_substream *substream, | |||
648 | 648 | ||
649 | dma_params = ssc_p->dma_params[dir]; | 649 | dma_params = ssc_p->dma_params[dir]; |
650 | 650 | ||
651 | ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_enable); | 651 | ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_disable); |
652 | ssc_writel(ssc_p->ssc->regs, IDR, dma_params->mask->ssc_error); | 652 | ssc_writel(ssc_p->ssc->regs, IDR, dma_params->mask->ssc_error); |
653 | 653 | ||
654 | pr_debug("%s enabled SSC_SR=0x%08x\n", | 654 | pr_debug("%s enabled SSC_SR=0x%08x\n", |
@@ -657,6 +657,33 @@ static int atmel_ssc_prepare(struct snd_pcm_substream *substream, | |||
657 | return 0; | 657 | return 0; |
658 | } | 658 | } |
659 | 659 | ||
660 | static int atmel_ssc_trigger(struct snd_pcm_substream *substream, | ||
661 | int cmd, struct snd_soc_dai *dai) | ||
662 | { | ||
663 | struct atmel_ssc_info *ssc_p = &ssc_info[dai->id]; | ||
664 | struct atmel_pcm_dma_params *dma_params; | ||
665 | int dir; | ||
666 | |||
667 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
668 | dir = 0; | ||
669 | else | ||
670 | dir = 1; | ||
671 | |||
672 | dma_params = ssc_p->dma_params[dir]; | ||
673 | |||
674 | switch (cmd) { | ||
675 | case SNDRV_PCM_TRIGGER_START: | ||
676 | case SNDRV_PCM_TRIGGER_RESUME: | ||
677 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | ||
678 | ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_enable); | ||
679 | break; | ||
680 | default: | ||
681 | ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_disable); | ||
682 | break; | ||
683 | } | ||
684 | |||
685 | return 0; | ||
686 | } | ||
660 | 687 | ||
661 | #ifdef CONFIG_PM | 688 | #ifdef CONFIG_PM |
662 | static int atmel_ssc_suspend(struct snd_soc_dai *cpu_dai) | 689 | static int atmel_ssc_suspend(struct snd_soc_dai *cpu_dai) |
@@ -731,6 +758,7 @@ static const struct snd_soc_dai_ops atmel_ssc_dai_ops = { | |||
731 | .startup = atmel_ssc_startup, | 758 | .startup = atmel_ssc_startup, |
732 | .shutdown = atmel_ssc_shutdown, | 759 | .shutdown = atmel_ssc_shutdown, |
733 | .prepare = atmel_ssc_prepare, | 760 | .prepare = atmel_ssc_prepare, |
761 | .trigger = atmel_ssc_trigger, | ||
734 | .hw_params = atmel_ssc_hw_params, | 762 | .hw_params = atmel_ssc_hw_params, |
735 | .set_fmt = atmel_ssc_set_dai_fmt, | 763 | .set_fmt = atmel_ssc_set_dai_fmt, |
736 | .set_clkdiv = atmel_ssc_set_dai_clkdiv, | 764 | .set_clkdiv = atmel_ssc_set_dai_clkdiv, |
diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c index 1b372283bd01..7d6a9055874b 100644 --- a/sound/soc/atmel/sam9x5_wm8731.c +++ b/sound/soc/atmel/sam9x5_wm8731.c | |||
@@ -109,7 +109,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) | |||
109 | dai->stream_name = "WM8731 PCM"; | 109 | dai->stream_name = "WM8731 PCM"; |
110 | dai->codec_dai_name = "wm8731-hifi"; | 110 | dai->codec_dai_name = "wm8731-hifi"; |
111 | dai->init = sam9x5_wm8731_init; | 111 | dai->init = sam9x5_wm8731_init; |
112 | dai->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 112 | dai->dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF |
113 | | SND_SOC_DAIFMT_CBM_CFM; | 113 | | SND_SOC_DAIFMT_CBM_CFM; |
114 | 114 | ||
115 | ret = snd_soc_of_parse_card_name(card, "atmel,model"); | 115 | ret = snd_soc_of_parse_card_name(card, "atmel,model"); |
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 99b359e19d35..0ab2dc296474 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -1012,7 +1012,7 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = { | |||
1012 | { "AEC Loopback", "HPOUT3L", "OUT3L" }, | 1012 | { "AEC Loopback", "HPOUT3L", "OUT3L" }, |
1013 | { "AEC Loopback", "HPOUT3R", "OUT3R" }, | 1013 | { "AEC Loopback", "HPOUT3R", "OUT3R" }, |
1014 | { "HPOUT3L", NULL, "OUT3L" }, | 1014 | { "HPOUT3L", NULL, "OUT3L" }, |
1015 | { "HPOUT3R", NULL, "OUT3L" }, | 1015 | { "HPOUT3R", NULL, "OUT3R" }, |
1016 | 1016 | ||
1017 | { "AEC Loopback", "SPKOUTL", "OUT4L" }, | 1017 | { "AEC Loopback", "SPKOUTL", "OUT4L" }, |
1018 | { "SPKOUTLN", NULL, "OUT4L" }, | 1018 | { "SPKOUTLN", NULL, "OUT4L" }, |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 3938fb1c203e..53bbfac6a83a 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -1444,7 +1444,7 @@ static int wm8904_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
1444 | 1444 | ||
1445 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 1445 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
1446 | case SND_SOC_DAIFMT_DSP_B: | 1446 | case SND_SOC_DAIFMT_DSP_B: |
1447 | aif1 |= WM8904_AIF_LRCLK_INV; | 1447 | aif1 |= 0x3 | WM8904_AIF_LRCLK_INV; |
1448 | case SND_SOC_DAIFMT_DSP_A: | 1448 | case SND_SOC_DAIFMT_DSP_A: |
1449 | aif1 |= 0x3; | 1449 | aif1 |= 0x3; |
1450 | break; | 1450 | break; |
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 543c5c2631b6..0f17ed3e29f4 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -2439,7 +2439,20 @@ static void wm8962_configure_bclk(struct snd_soc_codec *codec) | |||
2439 | snd_soc_update_bits(codec, WM8962_CLOCKING_4, | 2439 | snd_soc_update_bits(codec, WM8962_CLOCKING_4, |
2440 | WM8962_SYSCLK_RATE_MASK, clocking4); | 2440 | WM8962_SYSCLK_RATE_MASK, clocking4); |
2441 | 2441 | ||
2442 | /* DSPCLK_DIV can be only generated correctly after enabling SYSCLK. | ||
2443 | * So we here provisionally enable it and then disable it afterward | ||
2444 | * if current bias_level hasn't reached SND_SOC_BIAS_ON. | ||
2445 | */ | ||
2446 | if (codec->dapm.bias_level != SND_SOC_BIAS_ON) | ||
2447 | snd_soc_update_bits(codec, WM8962_CLOCKING2, | ||
2448 | WM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA); | ||
2449 | |||
2442 | dspclk = snd_soc_read(codec, WM8962_CLOCKING1); | 2450 | dspclk = snd_soc_read(codec, WM8962_CLOCKING1); |
2451 | |||
2452 | if (codec->dapm.bias_level != SND_SOC_BIAS_ON) | ||
2453 | snd_soc_update_bits(codec, WM8962_CLOCKING2, | ||
2454 | WM8962_SYSCLK_ENA_MASK, 0); | ||
2455 | |||
2443 | if (dspclk < 0) { | 2456 | if (dspclk < 0) { |
2444 | dev_err(codec->dev, "Failed to read DSPCLK: %d\n", dspclk); | 2457 | dev_err(codec->dev, "Failed to read DSPCLK: %d\n", dspclk); |
2445 | return; | 2458 | return; |
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 46ec0e9744d4..4fbcab63e61f 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c | |||
@@ -1474,13 +1474,17 @@ static int wm_adsp2_ena(struct wm_adsp *dsp) | |||
1474 | return ret; | 1474 | return ret; |
1475 | 1475 | ||
1476 | /* Wait for the RAM to start, should be near instantaneous */ | 1476 | /* Wait for the RAM to start, should be near instantaneous */ |
1477 | count = 0; | 1477 | for (count = 0; count < 10; ++count) { |
1478 | do { | ||
1479 | ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1, | 1478 | ret = regmap_read(dsp->regmap, dsp->base + ADSP2_STATUS1, |
1480 | &val); | 1479 | &val); |
1481 | if (ret != 0) | 1480 | if (ret != 0) |
1482 | return ret; | 1481 | return ret; |
1483 | } while (!(val & ADSP2_RAM_RDY) && ++count < 10); | 1482 | |
1483 | if (val & ADSP2_RAM_RDY) | ||
1484 | break; | ||
1485 | |||
1486 | msleep(1); | ||
1487 | } | ||
1484 | 1488 | ||
1485 | if (!(val & ADSP2_RAM_RDY)) { | 1489 | if (!(val & ADSP2_RAM_RDY)) { |
1486 | adsp_err(dsp, "Failed to start DSP RAM\n"); | 1490 | adsp_err(dsp, "Failed to start DSP RAM\n"); |
diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c index 61e48852b9e8..3fd76bc391de 100644 --- a/sound/soc/fsl/imx-wm8962.c +++ b/sound/soc/fsl/imx-wm8962.c | |||
@@ -130,8 +130,6 @@ static int imx_wm8962_set_bias_level(struct snd_soc_card *card, | |||
130 | break; | 130 | break; |
131 | } | 131 | } |
132 | 132 | ||
133 | dapm->bias_level = level; | ||
134 | |||
135 | return 0; | 133 | return 0; |
136 | } | 134 | } |
137 | 135 | ||
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 0b18f654b413..3920a5e8125f 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c | |||
@@ -473,17 +473,17 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk[2] = { | |||
473 | .playback = { | 473 | .playback = { |
474 | .channels_min = 1, | 474 | .channels_min = 1, |
475 | .channels_max = 2, | 475 | .channels_max = 2, |
476 | .rates = SNDRV_PCM_RATE_8000_192000 | | 476 | .rates = SNDRV_PCM_RATE_CONTINUOUS, |
477 | SNDRV_PCM_RATE_CONTINUOUS | | 477 | .rate_min = 5512, |
478 | SNDRV_PCM_RATE_KNOT, | 478 | .rate_max = 192000, |
479 | .formats = KIRKWOOD_I2S_FORMATS, | 479 | .formats = KIRKWOOD_I2S_FORMATS, |
480 | }, | 480 | }, |
481 | .capture = { | 481 | .capture = { |
482 | .channels_min = 1, | 482 | .channels_min = 1, |
483 | .channels_max = 2, | 483 | .channels_max = 2, |
484 | .rates = SNDRV_PCM_RATE_8000_192000 | | 484 | .rates = SNDRV_PCM_RATE_CONTINUOUS, |
485 | SNDRV_PCM_RATE_CONTINUOUS | | 485 | .rate_min = 5512, |
486 | SNDRV_PCM_RATE_KNOT, | 486 | .rate_max = 192000, |
487 | .formats = KIRKWOOD_I2S_FORMATS, | 487 | .formats = KIRKWOOD_I2S_FORMATS, |
488 | }, | 488 | }, |
489 | .ops = &kirkwood_i2s_dai_ops, | 489 | .ops = &kirkwood_i2s_dai_ops, |
@@ -494,17 +494,17 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk[2] = { | |||
494 | .playback = { | 494 | .playback = { |
495 | .channels_min = 1, | 495 | .channels_min = 1, |
496 | .channels_max = 2, | 496 | .channels_max = 2, |
497 | .rates = SNDRV_PCM_RATE_8000_192000 | | 497 | .rates = SNDRV_PCM_RATE_CONTINUOUS, |
498 | SNDRV_PCM_RATE_CONTINUOUS | | 498 | .rate_min = 5512, |
499 | SNDRV_PCM_RATE_KNOT, | 499 | .rate_max = 192000, |
500 | .formats = KIRKWOOD_SPDIF_FORMATS, | 500 | .formats = KIRKWOOD_SPDIF_FORMATS, |
501 | }, | 501 | }, |
502 | .capture = { | 502 | .capture = { |
503 | .channels_min = 1, | 503 | .channels_min = 1, |
504 | .channels_max = 2, | 504 | .channels_max = 2, |
505 | .rates = SNDRV_PCM_RATE_8000_192000 | | 505 | .rates = SNDRV_PCM_RATE_CONTINUOUS, |
506 | SNDRV_PCM_RATE_CONTINUOUS | | 506 | .rate_min = 5512, |
507 | SNDRV_PCM_RATE_KNOT, | 507 | .rate_max = 192000, |
508 | .formats = KIRKWOOD_SPDIF_FORMATS, | 508 | .formats = KIRKWOOD_SPDIF_FORMATS, |
509 | }, | 509 | }, |
510 | .ops = &kirkwood_i2s_dai_ops, | 510 | .ops = &kirkwood_i2s_dai_ops, |
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index cbc9c96ce1f4..41949af3baae 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c | |||
@@ -305,6 +305,20 @@ static void dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm, | |||
305 | } | 305 | } |
306 | } | 306 | } |
307 | 307 | ||
308 | static void dmaengine_pcm_release_chan(struct dmaengine_pcm *pcm) | ||
309 | { | ||
310 | unsigned int i; | ||
311 | |||
312 | for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; | ||
313 | i++) { | ||
314 | if (!pcm->chan[i]) | ||
315 | continue; | ||
316 | dma_release_channel(pcm->chan[i]); | ||
317 | if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) | ||
318 | break; | ||
319 | } | ||
320 | } | ||
321 | |||
308 | /** | 322 | /** |
309 | * snd_dmaengine_pcm_register - Register a dmaengine based PCM device | 323 | * snd_dmaengine_pcm_register - Register a dmaengine based PCM device |
310 | * @dev: The parent device for the PCM device | 324 | * @dev: The parent device for the PCM device |
@@ -315,6 +329,7 @@ int snd_dmaengine_pcm_register(struct device *dev, | |||
315 | const struct snd_dmaengine_pcm_config *config, unsigned int flags) | 329 | const struct snd_dmaengine_pcm_config *config, unsigned int flags) |
316 | { | 330 | { |
317 | struct dmaengine_pcm *pcm; | 331 | struct dmaengine_pcm *pcm; |
332 | int ret; | ||
318 | 333 | ||
319 | pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); | 334 | pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); |
320 | if (!pcm) | 335 | if (!pcm) |
@@ -326,11 +341,20 @@ int snd_dmaengine_pcm_register(struct device *dev, | |||
326 | dmaengine_pcm_request_chan_of(pcm, dev); | 341 | dmaengine_pcm_request_chan_of(pcm, dev); |
327 | 342 | ||
328 | if (flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) | 343 | if (flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) |
329 | return snd_soc_add_platform(dev, &pcm->platform, | 344 | ret = snd_soc_add_platform(dev, &pcm->platform, |
330 | &dmaengine_no_residue_pcm_platform); | 345 | &dmaengine_no_residue_pcm_platform); |
331 | else | 346 | else |
332 | return snd_soc_add_platform(dev, &pcm->platform, | 347 | ret = snd_soc_add_platform(dev, &pcm->platform, |
333 | &dmaengine_pcm_platform); | 348 | &dmaengine_pcm_platform); |
349 | if (ret) | ||
350 | goto err_free_dma; | ||
351 | |||
352 | return 0; | ||
353 | |||
354 | err_free_dma: | ||
355 | dmaengine_pcm_release_chan(pcm); | ||
356 | kfree(pcm); | ||
357 | return ret; | ||
334 | } | 358 | } |
335 | EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_register); | 359 | EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_register); |
336 | 360 | ||
@@ -345,7 +369,6 @@ void snd_dmaengine_pcm_unregister(struct device *dev) | |||
345 | { | 369 | { |
346 | struct snd_soc_platform *platform; | 370 | struct snd_soc_platform *platform; |
347 | struct dmaengine_pcm *pcm; | 371 | struct dmaengine_pcm *pcm; |
348 | unsigned int i; | ||
349 | 372 | ||
350 | platform = snd_soc_lookup_platform(dev); | 373 | platform = snd_soc_lookup_platform(dev); |
351 | if (!platform) | 374 | if (!platform) |
@@ -353,15 +376,8 @@ void snd_dmaengine_pcm_unregister(struct device *dev) | |||
353 | 376 | ||
354 | pcm = soc_platform_to_pcm(platform); | 377 | pcm = soc_platform_to_pcm(platform); |
355 | 378 | ||
356 | for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) { | ||
357 | if (pcm->chan[i]) { | ||
358 | dma_release_channel(pcm->chan[i]); | ||
359 | if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) | ||
360 | break; | ||
361 | } | ||
362 | } | ||
363 | |||
364 | snd_soc_remove_platform(platform); | 379 | snd_soc_remove_platform(platform); |
380 | dmaengine_pcm_release_chan(pcm); | ||
365 | kfree(pcm); | 381 | kfree(pcm); |
366 | } | 382 | } |
367 | EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_unregister); | 383 | EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_unregister); |
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 11a90cd027fa..891b9a9bcbf8 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -600,12 +600,13 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream) | |||
600 | struct snd_soc_platform *platform = rtd->platform; | 600 | struct snd_soc_platform *platform = rtd->platform; |
601 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 601 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
602 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 602 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
603 | struct snd_soc_codec *codec = rtd->codec; | 603 | bool playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; |
604 | 604 | ||
605 | mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass); | 605 | mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass); |
606 | 606 | ||
607 | /* apply codec digital mute */ | 607 | /* apply codec digital mute */ |
608 | if (!codec->active) | 608 | if ((playback && codec_dai->playback_active == 1) || |
609 | (!playback && codec_dai->capture_active == 1)) | ||
609 | snd_soc_dai_digital_mute(codec_dai, 1, substream->stream); | 610 | snd_soc_dai_digital_mute(codec_dai, 1, substream->stream); |
610 | 611 | ||
611 | /* free any machine hw params */ | 612 | /* free any machine hw params */ |
diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c index 364bf6a907e1..8c819f811470 100644 --- a/sound/soc/tegra/tegra20_i2s.c +++ b/sound/soc/tegra/tegra20_i2s.c | |||
@@ -74,7 +74,7 @@ static int tegra20_i2s_set_fmt(struct snd_soc_dai *dai, | |||
74 | unsigned int fmt) | 74 | unsigned int fmt) |
75 | { | 75 | { |
76 | struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 76 | struct tegra20_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
77 | unsigned int mask, val; | 77 | unsigned int mask = 0, val = 0; |
78 | 78 | ||
79 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { | 79 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { |
80 | case SND_SOC_DAIFMT_NB_NF: | 80 | case SND_SOC_DAIFMT_NB_NF: |
@@ -83,10 +83,10 @@ static int tegra20_i2s_set_fmt(struct snd_soc_dai *dai, | |||
83 | return -EINVAL; | 83 | return -EINVAL; |
84 | } | 84 | } |
85 | 85 | ||
86 | mask = TEGRA20_I2S_CTRL_MASTER_ENABLE; | 86 | mask |= TEGRA20_I2S_CTRL_MASTER_ENABLE; |
87 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { | 87 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { |
88 | case SND_SOC_DAIFMT_CBS_CFS: | 88 | case SND_SOC_DAIFMT_CBS_CFS: |
89 | val = TEGRA20_I2S_CTRL_MASTER_ENABLE; | 89 | val |= TEGRA20_I2S_CTRL_MASTER_ENABLE; |
90 | break; | 90 | break; |
91 | case SND_SOC_DAIFMT_CBM_CFM: | 91 | case SND_SOC_DAIFMT_CBM_CFM: |
92 | break; | 92 | break; |
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 08bc6931c7c7..8c7c1028e579 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c | |||
@@ -67,15 +67,15 @@ static int tegra20_spdif_hw_params(struct snd_pcm_substream *substream, | |||
67 | { | 67 | { |
68 | struct device *dev = dai->dev; | 68 | struct device *dev = dai->dev; |
69 | struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); | 69 | struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); |
70 | unsigned int mask, val; | 70 | unsigned int mask = 0, val = 0; |
71 | int ret, spdifclock; | 71 | int ret, spdifclock; |
72 | 72 | ||
73 | mask = TEGRA20_SPDIF_CTRL_PACK | | 73 | mask |= TEGRA20_SPDIF_CTRL_PACK | |
74 | TEGRA20_SPDIF_CTRL_BIT_MODE_MASK; | 74 | TEGRA20_SPDIF_CTRL_BIT_MODE_MASK; |
75 | switch (params_format(params)) { | 75 | switch (params_format(params)) { |
76 | case SNDRV_PCM_FORMAT_S16_LE: | 76 | case SNDRV_PCM_FORMAT_S16_LE: |
77 | val = TEGRA20_SPDIF_CTRL_PACK | | 77 | val |= TEGRA20_SPDIF_CTRL_PACK | |
78 | TEGRA20_SPDIF_CTRL_BIT_MODE_16BIT; | 78 | TEGRA20_SPDIF_CTRL_BIT_MODE_16BIT; |
79 | break; | 79 | break; |
80 | default: | 80 | default: |
81 | return -EINVAL; | 81 | return -EINVAL; |
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index 231a785b3921..02247fee1cf7 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c | |||
@@ -118,7 +118,7 @@ static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai, | |||
118 | unsigned int fmt) | 118 | unsigned int fmt) |
119 | { | 119 | { |
120 | struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 120 | struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
121 | unsigned int mask, val; | 121 | unsigned int mask = 0, val = 0; |
122 | 122 | ||
123 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { | 123 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { |
124 | case SND_SOC_DAIFMT_NB_NF: | 124 | case SND_SOC_DAIFMT_NB_NF: |
@@ -127,10 +127,10 @@ static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai, | |||
127 | return -EINVAL; | 127 | return -EINVAL; |
128 | } | 128 | } |
129 | 129 | ||
130 | mask = TEGRA30_I2S_CTRL_MASTER_ENABLE; | 130 | mask |= TEGRA30_I2S_CTRL_MASTER_ENABLE; |
131 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { | 131 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { |
132 | case SND_SOC_DAIFMT_CBS_CFS: | 132 | case SND_SOC_DAIFMT_CBS_CFS: |
133 | val = TEGRA30_I2S_CTRL_MASTER_ENABLE; | 133 | val |= TEGRA30_I2S_CTRL_MASTER_ENABLE; |
134 | break; | 134 | break; |
135 | case SND_SOC_DAIFMT_CBM_CFM: | 135 | case SND_SOC_DAIFMT_CBM_CFM: |
136 | break; | 136 | break; |
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 3454262358b3..f4b12c216f1c 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
@@ -1603,7 +1603,7 @@ static int snd_microii_controls_create(struct usb_mixer_interface *mixer) | |||
1603 | return err; | 1603 | return err; |
1604 | } | 1604 | } |
1605 | 1605 | ||
1606 | return err; | 1606 | return 0; |
1607 | } | 1607 | } |
1608 | 1608 | ||
1609 | int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer) | 1609 | int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer) |