summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-07-26 03:26:29 -0400
committerDave Airlie <airlied@redhat.com>2016-07-26 03:26:29 -0400
commit5e580523d9128a4d8364fe89d36c38fc7819c8dd (patch)
tree852fb2427d980830ae8686a91e4ca5873f259ab9 /sound
parentc11dea5b0290984fa48111957ba3fdc5b3bdae5a (diff)
parent523d939ef98fd712632d93a5a2b588e477a7565e (diff)
Backmerge tag 'v4.7' into drm-next
Linux 4.7 As requested by Daniel Vetter as the conflicts were getting messy.
Diffstat (limited to 'sound')
-rw-r--r--sound/core/control.c2
-rw-r--r--sound/core/pcm.c14
-rw-r--r--sound/core/timer.c2
-rw-r--r--sound/pci/au88x0/au88x0_core.c5
-rw-r--r--sound/pci/echoaudio/echoaudio.c4
-rw-r--r--sound/pci/hda/hda_generic.c2
-rw-r--r--sound/pci/hda/hda_intel.c12
-rw-r--r--sound/pci/hda/patch_realtek.c16
-rw-r--r--sound/soc/codecs/Kconfig7
-rw-r--r--sound/soc/codecs/ak4613.c2
-rw-r--r--sound/soc/codecs/cx20442.c1
-rw-r--r--sound/soc/codecs/hdac_hdmi.c20
-rw-r--r--sound/soc/codecs/rt5645.c2
-rw-r--r--sound/soc/codecs/rt5670.c2
-rw-r--r--sound/soc/codecs/wm5102.c2
-rw-r--r--sound/soc/codecs/wm5110.c1
-rw-r--r--sound/soc/codecs/wm8940.c1
-rw-r--r--sound/soc/davinci/davinci-mcasp.c56
-rw-r--r--sound/soc/davinci/davinci-mcasp.h4
-rw-r--r--sound/soc/fsl/fsl_ssi.c12
-rw-r--r--sound/soc/intel/atom/sst-mfld-platform-compress.c9
-rw-r--r--sound/soc/intel/skylake/bxt-sst.c1
-rw-r--r--sound/soc/sh/rcar/adg.c2
-rw-r--r--sound/usb/card.c2
24 files changed, 145 insertions, 36 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index a85d45595d02..b4fe9b002512 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -160,6 +160,8 @@ void snd_ctl_notify(struct snd_card *card, unsigned int mask,
160 160
161 if (snd_BUG_ON(!card || !id)) 161 if (snd_BUG_ON(!card || !id))
162 return; 162 return;
163 if (card->shutdown)
164 return;
163 read_lock(&card->ctl_files_rwlock); 165 read_lock(&card->ctl_files_rwlock);
164#if IS_ENABLED(CONFIG_SND_MIXER_OSS) 166#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
165 card->mixer_oss_change_count++; 167 card->mixer_oss_change_count++;
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 308c9ecf73db..8e980aa678d0 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -849,6 +849,14 @@ int snd_pcm_new_internal(struct snd_card *card, const char *id, int device,
849} 849}
850EXPORT_SYMBOL(snd_pcm_new_internal); 850EXPORT_SYMBOL(snd_pcm_new_internal);
851 851
852static void free_chmap(struct snd_pcm_str *pstr)
853{
854 if (pstr->chmap_kctl) {
855 snd_ctl_remove(pstr->pcm->card, pstr->chmap_kctl);
856 pstr->chmap_kctl = NULL;
857 }
858}
859
852static void snd_pcm_free_stream(struct snd_pcm_str * pstr) 860static void snd_pcm_free_stream(struct snd_pcm_str * pstr)
853{ 861{
854 struct snd_pcm_substream *substream, *substream_next; 862 struct snd_pcm_substream *substream, *substream_next;
@@ -871,6 +879,7 @@ static void snd_pcm_free_stream(struct snd_pcm_str * pstr)
871 kfree(setup); 879 kfree(setup);
872 } 880 }
873#endif 881#endif
882 free_chmap(pstr);
874 if (pstr->substream_count) 883 if (pstr->substream_count)
875 put_device(&pstr->dev); 884 put_device(&pstr->dev);
876} 885}
@@ -1135,10 +1144,7 @@ static int snd_pcm_dev_disconnect(struct snd_device *device)
1135 for (cidx = 0; cidx < 2; cidx++) { 1144 for (cidx = 0; cidx < 2; cidx++) {
1136 if (!pcm->internal) 1145 if (!pcm->internal)
1137 snd_unregister_device(&pcm->streams[cidx].dev); 1146 snd_unregister_device(&pcm->streams[cidx].dev);
1138 if (pcm->streams[cidx].chmap_kctl) { 1147 free_chmap(&pcm->streams[cidx]);
1139 snd_ctl_remove(pcm->card, pcm->streams[cidx].chmap_kctl);
1140 pcm->streams[cidx].chmap_kctl = NULL;
1141 }
1142 } 1148 }
1143 mutex_unlock(&pcm->open_mutex); 1149 mutex_unlock(&pcm->open_mutex);
1144 mutex_unlock(&register_mutex); 1150 mutex_unlock(&register_mutex);
diff --git a/sound/core/timer.c b/sound/core/timer.c
index e722022d325d..9a6157ea6881 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1955,6 +1955,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
1955 1955
1956 qhead = tu->qhead++; 1956 qhead = tu->qhead++;
1957 tu->qhead %= tu->queue_size; 1957 tu->qhead %= tu->queue_size;
1958 tu->qused--;
1958 spin_unlock_irq(&tu->qlock); 1959 spin_unlock_irq(&tu->qlock);
1959 1960
1960 if (tu->tread) { 1961 if (tu->tread) {
@@ -1968,7 +1969,6 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
1968 } 1969 }
1969 1970
1970 spin_lock_irq(&tu->qlock); 1971 spin_lock_irq(&tu->qlock);
1971 tu->qused--;
1972 if (err < 0) 1972 if (err < 0)
1973 goto _error; 1973 goto _error;
1974 result += unit; 1974 result += unit;
diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
index 4a054d720112..d3125c169684 100644
--- a/sound/pci/au88x0/au88x0_core.c
+++ b/sound/pci/au88x0/au88x0_core.c
@@ -1444,9 +1444,8 @@ static int vortex_wtdma_bufshift(vortex_t * vortex, int wtdma)
1444 int page, p, pp, delta, i; 1444 int page, p, pp, delta, i;
1445 1445
1446 page = 1446 page =
1447 (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2)) & 1447 (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2))
1448 WT_SUBBUF_MASK) 1448 >> WT_SUBBUF_SHIFT) & WT_SUBBUF_MASK;
1449 >> WT_SUBBUF_SHIFT;
1450 if (dma->nr_periods >= 4) 1449 if (dma->nr_periods >= 4)
1451 delta = (page - dma->period_real) & 3; 1450 delta = (page - dma->period_real) & 3;
1452 else { 1451 else {
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 1cb85aeb0cea..286f5e3686a3 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -2200,11 +2200,11 @@ static int snd_echo_resume(struct device *dev)
2200 u32 pipe_alloc_mask; 2200 u32 pipe_alloc_mask;
2201 int err; 2201 int err;
2202 2202
2203 commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL); 2203 commpage_bak = kmalloc(sizeof(*commpage), GFP_KERNEL);
2204 if (commpage_bak == NULL) 2204 if (commpage_bak == NULL)
2205 return -ENOMEM; 2205 return -ENOMEM;
2206 commpage = chip->comm_page; 2206 commpage = chip->comm_page;
2207 memcpy(commpage_bak, commpage, sizeof(struct comm_page)); 2207 memcpy(commpage_bak, commpage, sizeof(*commpage));
2208 2208
2209 err = init_hw(chip, chip->pci->device, chip->pci->subsystem_device); 2209 err = init_hw(chip, chip->pci->device, chip->pci->subsystem_device);
2210 if (err < 0) { 2210 if (err < 0) {
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 320445f3bf73..79c7b340acc2 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -3977,6 +3977,8 @@ static hda_nid_t set_path_power(struct hda_codec *codec, hda_nid_t nid,
3977 3977
3978 for (n = 0; n < spec->paths.used; n++) { 3978 for (n = 0; n < spec->paths.used; n++) {
3979 path = snd_array_elem(&spec->paths, n); 3979 path = snd_array_elem(&spec->paths, n);
3980 if (!path->depth)
3981 continue;
3980 if (path->path[0] == nid || 3982 if (path->path[0] == nid ||
3981 path->path[path->depth - 1] == nid) { 3983 path->path[path->depth - 1] == nid) {
3982 bool pin_old = path->pin_enabled; 3984 bool pin_old = path->pin_enabled;
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 94089fc71884..6f8ea13323c1 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -367,9 +367,10 @@ enum {
367#define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70) 367#define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70)
368#define IS_KBL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa171) 368#define IS_KBL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa171)
369#define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71) 369#define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71)
370#define IS_KBL_H(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa2f0)
370#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) 371#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
371#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \ 372#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \
372 IS_KBL(pci) || IS_KBL_LP(pci) 373 IS_KBL(pci) || IS_KBL_LP(pci) || IS_KBL_H(pci)
373 374
374static char *driver_short_names[] = { 375static char *driver_short_names[] = {
375 [AZX_DRIVER_ICH] = "HDA Intel", 376 [AZX_DRIVER_ICH] = "HDA Intel",
@@ -1217,8 +1218,10 @@ static int azx_free(struct azx *chip)
1217 if (use_vga_switcheroo(hda)) { 1218 if (use_vga_switcheroo(hda)) {
1218 if (chip->disabled && hda->probe_continued) 1219 if (chip->disabled && hda->probe_continued)
1219 snd_hda_unlock_devices(&chip->bus); 1220 snd_hda_unlock_devices(&chip->bus);
1220 if (hda->vga_switcheroo_registered) 1221 if (hda->vga_switcheroo_registered) {
1221 vga_switcheroo_unregister_client(chip->pci); 1222 vga_switcheroo_unregister_client(chip->pci);
1223 vga_switcheroo_fini_domain_pm_ops(chip->card->dev);
1224 }
1222 } 1225 }
1223 1226
1224 if (bus->chip_init) { 1227 if (bus->chip_init) {
@@ -2190,6 +2193,9 @@ static const struct pci_device_id azx_ids[] = {
2190 /* Kabylake-LP */ 2193 /* Kabylake-LP */
2191 { PCI_DEVICE(0x8086, 0x9d71), 2194 { PCI_DEVICE(0x8086, 0x9d71),
2192 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, 2195 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
2196 /* Kabylake-H */
2197 { PCI_DEVICE(0x8086, 0xa2f0),
2198 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
2193 /* Broxton-P(Apollolake) */ 2199 /* Broxton-P(Apollolake) */
2194 { PCI_DEVICE(0x8086, 0x5a98), 2200 { PCI_DEVICE(0x8086, 0x5a98),
2195 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, 2201 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON },
@@ -2263,6 +2269,8 @@ static const struct pci_device_id azx_ids[] = {
2263 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2269 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2264 { PCI_DEVICE(0x1002, 0x157a), 2270 { PCI_DEVICE(0x1002, 0x157a),
2265 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2271 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2272 { PCI_DEVICE(0x1002, 0x15b3),
2273 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2266 { PCI_DEVICE(0x1002, 0x793b), 2274 { PCI_DEVICE(0x1002, 0x793b),
2267 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2275 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
2268 { PCI_DEVICE(0x1002, 0x7919), 2276 { PCI_DEVICE(0x1002, 0x7919),
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 900bfbc3368c..abcb5a6a1cd9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5651,6 +5651,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
5651 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK), 5651 SND_PCI_QUIRK(0x17aa, 0x504a, "ThinkPad X260", ALC292_FIXUP_TPT440_DOCK),
5652 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE), 5652 SND_PCI_QUIRK(0x17aa, 0x504b, "Thinkpad", ALC293_FIXUP_LENOVO_SPK_NOISE),
5653 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460), 5653 SND_PCI_QUIRK(0x17aa, 0x5050, "Thinkpad T560p", ALC292_FIXUP_TPT460),
5654 SND_PCI_QUIRK(0x17aa, 0x5051, "Thinkpad L460", ALC292_FIXUP_TPT460),
5654 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460), 5655 SND_PCI_QUIRK(0x17aa, 0x5053, "Thinkpad T460", ALC292_FIXUP_TPT460),
5655 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 5656 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
5656 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 5657 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
@@ -5737,7 +5738,6 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
5737 {} 5738 {}
5738}; 5739};
5739#define ALC225_STANDARD_PINS \ 5740#define ALC225_STANDARD_PINS \
5740 {0x12, 0xb7a60130}, \
5741 {0x21, 0x04211020} 5741 {0x21, 0x04211020}
5742 5742
5743#define ALC256_STANDARD_PINS \ 5743#define ALC256_STANDARD_PINS \
@@ -5762,10 +5762,24 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
5762static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { 5762static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
5763 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 5763 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
5764 ALC225_STANDARD_PINS, 5764 ALC225_STANDARD_PINS,
5765 {0x12, 0xb7a60130},
5765 {0x14, 0x901701a0}), 5766 {0x14, 0x901701a0}),
5766 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE, 5767 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
5767 ALC225_STANDARD_PINS, 5768 ALC225_STANDARD_PINS,
5769 {0x12, 0xb7a60130},
5768 {0x14, 0x901701b0}), 5770 {0x14, 0x901701b0}),
5771 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
5772 ALC225_STANDARD_PINS,
5773 {0x12, 0xb7a60150},
5774 {0x14, 0x901701a0}),
5775 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
5776 ALC225_STANDARD_PINS,
5777 {0x12, 0xb7a60150},
5778 {0x14, 0x901701b0}),
5779 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
5780 ALC225_STANDARD_PINS,
5781 {0x12, 0xb7a60130},
5782 {0x1b, 0x90170110}),
5769 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, 5783 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
5770 {0x14, 0x90170110}, 5784 {0x14, 0x90170110},
5771 {0x21, 0x02211020}), 5785 {0x21, 0x02211020}),
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 4d82a58ff6b0..f3fb98f0a995 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -483,9 +483,10 @@ config SND_SOC_DMIC
483 tristate 483 tristate
484 484
485config SND_SOC_HDMI_CODEC 485config SND_SOC_HDMI_CODEC
486 tristate 486 tristate
487 select SND_PCM_ELD 487 select SND_PCM_ELD
488 select SND_PCM_IEC958 488 select SND_PCM_IEC958
489 select HDMI
489 490
490config SND_SOC_ES8328 491config SND_SOC_ES8328
491 tristate "Everest Semi ES8328 CODEC" 492 tristate "Everest Semi ES8328 CODEC"
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index 647f69de6baa..5013d2ba0c10 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -146,6 +146,7 @@ static const struct regmap_config ak4613_regmap_cfg = {
146 .max_register = 0x16, 146 .max_register = 0x16,
147 .reg_defaults = ak4613_reg, 147 .reg_defaults = ak4613_reg,
148 .num_reg_defaults = ARRAY_SIZE(ak4613_reg), 148 .num_reg_defaults = ARRAY_SIZE(ak4613_reg),
149 .cache_type = REGCACHE_RBTREE,
149}; 150};
150 151
151static const struct of_device_id ak4613_of_match[] = { 152static const struct of_device_id ak4613_of_match[] = {
@@ -530,7 +531,6 @@ static int ak4613_i2c_remove(struct i2c_client *client)
530static struct i2c_driver ak4613_i2c_driver = { 531static struct i2c_driver ak4613_i2c_driver = {
531 .driver = { 532 .driver = {
532 .name = "ak4613-codec", 533 .name = "ak4613-codec",
533 .owner = THIS_MODULE,
534 .of_match_table = ak4613_of_match, 534 .of_match_table = ak4613_of_match,
535 }, 535 },
536 .probe = ak4613_i2c_probe, 536 .probe = ak4613_i2c_probe,
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
index d6f4abbbf8a7..fb3885fe0afb 100644
--- a/sound/soc/codecs/cx20442.c
+++ b/sound/soc/codecs/cx20442.c
@@ -226,6 +226,7 @@ static int v253_open(struct tty_struct *tty)
226 if (!tty->disc_data) 226 if (!tty->disc_data)
227 return -ENODEV; 227 return -ENODEV;
228 228
229 tty->receive_room = 16;
229 if (tty->ops->write(tty, v253_init, len) != len) { 230 if (tty->ops->write(tty, v253_init, len) != len) {
230 ret = -EIO; 231 ret = -EIO;
231 goto err; 232 goto err;
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 181cd3bf0b92..2abb742fc47b 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1474,6 +1474,11 @@ static int hdmi_codec_probe(struct snd_soc_codec *codec)
1474 * exit, we call pm_runtime_suspend() so that will do for us 1474 * exit, we call pm_runtime_suspend() so that will do for us
1475 */ 1475 */
1476 hlink = snd_hdac_ext_bus_get_link(edev->ebus, dev_name(&edev->hdac.dev)); 1476 hlink = snd_hdac_ext_bus_get_link(edev->ebus, dev_name(&edev->hdac.dev));
1477 if (!hlink) {
1478 dev_err(&edev->hdac.dev, "hdac link not found\n");
1479 return -EIO;
1480 }
1481
1477 snd_hdac_ext_bus_link_get(edev->ebus, hlink); 1482 snd_hdac_ext_bus_link_get(edev->ebus, hlink);
1478 1483
1479 ret = create_fill_widget_route_map(dapm); 1484 ret = create_fill_widget_route_map(dapm);
@@ -1634,6 +1639,11 @@ static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)
1634 1639
1635 /* hold the ref while we probe */ 1640 /* hold the ref while we probe */
1636 hlink = snd_hdac_ext_bus_get_link(edev->ebus, dev_name(&edev->hdac.dev)); 1641 hlink = snd_hdac_ext_bus_get_link(edev->ebus, dev_name(&edev->hdac.dev));
1642 if (!hlink) {
1643 dev_err(&edev->hdac.dev, "hdac link not found\n");
1644 return -EIO;
1645 }
1646
1637 snd_hdac_ext_bus_link_get(edev->ebus, hlink); 1647 snd_hdac_ext_bus_link_get(edev->ebus, hlink);
1638 1648
1639 hdmi_priv = devm_kzalloc(&codec->dev, sizeof(*hdmi_priv), GFP_KERNEL); 1649 hdmi_priv = devm_kzalloc(&codec->dev, sizeof(*hdmi_priv), GFP_KERNEL);
@@ -1744,6 +1754,11 @@ static int hdac_hdmi_runtime_suspend(struct device *dev)
1744 } 1754 }
1745 1755
1746 hlink = snd_hdac_ext_bus_get_link(ebus, dev_name(dev)); 1756 hlink = snd_hdac_ext_bus_get_link(ebus, dev_name(dev));
1757 if (!hlink) {
1758 dev_err(dev, "hdac link not found\n");
1759 return -EIO;
1760 }
1761
1747 snd_hdac_ext_bus_link_put(ebus, hlink); 1762 snd_hdac_ext_bus_link_put(ebus, hlink);
1748 1763
1749 return 0; 1764 return 0;
@@ -1765,6 +1780,11 @@ static int hdac_hdmi_runtime_resume(struct device *dev)
1765 return 0; 1780 return 0;
1766 1781
1767 hlink = snd_hdac_ext_bus_get_link(ebus, dev_name(dev)); 1782 hlink = snd_hdac_ext_bus_get_link(ebus, dev_name(dev));
1783 if (!hlink) {
1784 dev_err(dev, "hdac link not found\n");
1785 return -EIO;
1786 }
1787
1768 snd_hdac_ext_bus_link_get(ebus, hlink); 1788 snd_hdac_ext_bus_link_get(ebus, hlink);
1769 1789
1770 err = snd_hdac_display_power(bus, true); 1790 err = snd_hdac_display_power(bus, true);
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 3c6594da6c9c..d70847c9eeb0 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -253,7 +253,7 @@ static const struct reg_default rt5650_reg[] = {
253 { 0x2b, 0x5454 }, 253 { 0x2b, 0x5454 },
254 { 0x2c, 0xaaa0 }, 254 { 0x2c, 0xaaa0 },
255 { 0x2d, 0x0000 }, 255 { 0x2d, 0x0000 },
256 { 0x2f, 0x1002 }, 256 { 0x2f, 0x5002 },
257 { 0x31, 0x5000 }, 257 { 0x31, 0x5000 },
258 { 0x32, 0x0000 }, 258 { 0x32, 0x0000 },
259 { 0x33, 0x0000 }, 259 { 0x33, 0x0000 },
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index 49a9e7049e2b..0af5ddbef1da 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -619,7 +619,7 @@ static const struct snd_kcontrol_new rt5670_snd_controls[] = {
619 RT5670_L_MUTE_SFT, RT5670_R_MUTE_SFT, 1, 1), 619 RT5670_L_MUTE_SFT, RT5670_R_MUTE_SFT, 1, 1),
620 SOC_DOUBLE_TLV("HP Playback Volume", RT5670_HP_VOL, 620 SOC_DOUBLE_TLV("HP Playback Volume", RT5670_HP_VOL,
621 RT5670_L_VOL_SFT, RT5670_R_VOL_SFT, 621 RT5670_L_VOL_SFT, RT5670_R_VOL_SFT,
622 39, 0, out_vol_tlv), 622 39, 1, out_vol_tlv),
623 /* OUTPUT Control */ 623 /* OUTPUT Control */
624 SOC_DOUBLE("OUT Channel Switch", RT5670_LOUT1, 624 SOC_DOUBLE("OUT Channel Switch", RT5670_LOUT1,
625 RT5670_VOL_L_SFT, RT5670_VOL_R_SFT, 1, 1), 625 RT5670_VOL_L_SFT, RT5670_VOL_R_SFT, 1, 1),
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index da60e3fe5ee7..e7fe6b7b95b7 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -1872,7 +1872,7 @@ static struct snd_soc_dai_driver wm5102_dai[] = {
1872 .capture = { 1872 .capture = {
1873 .stream_name = "Audio Trace CPU", 1873 .stream_name = "Audio Trace CPU",
1874 .channels_min = 1, 1874 .channels_min = 1,
1875 .channels_max = 6, 1875 .channels_max = 4,
1876 .rates = WM5102_RATES, 1876 .rates = WM5102_RATES,
1877 .formats = WM5102_FORMATS, 1877 .formats = WM5102_FORMATS,
1878 }, 1878 },
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index b5820e4d5471..d54f1b46c9ec 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -1723,6 +1723,7 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
1723 { "OUT2L", NULL, "SYSCLK" }, 1723 { "OUT2L", NULL, "SYSCLK" },
1724 { "OUT2R", NULL, "SYSCLK" }, 1724 { "OUT2R", NULL, "SYSCLK" },
1725 { "OUT3L", NULL, "SYSCLK" }, 1725 { "OUT3L", NULL, "SYSCLK" },
1726 { "OUT3R", NULL, "SYSCLK" },
1726 { "OUT4L", NULL, "SYSCLK" }, 1727 { "OUT4L", NULL, "SYSCLK" },
1727 { "OUT4R", NULL, "SYSCLK" }, 1728 { "OUT4R", NULL, "SYSCLK" },
1728 { "OUT5L", NULL, "SYSCLK" }, 1729 { "OUT5L", NULL, "SYSCLK" },
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index f6f9395ea38e..1c600819f768 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -743,6 +743,7 @@ static const struct regmap_config wm8940_regmap = {
743 .max_register = WM8940_MONOMIX, 743 .max_register = WM8940_MONOMIX,
744 .reg_defaults = wm8940_reg_defaults, 744 .reg_defaults = wm8940_reg_defaults,
745 .num_reg_defaults = ARRAY_SIZE(wm8940_reg_defaults), 745 .num_reg_defaults = ARRAY_SIZE(wm8940_reg_defaults),
746 .cache_type = REGCACHE_RBTREE,
746 747
747 .readable_reg = wm8940_readable_register, 748 .readable_reg = wm8940_readable_register,
748 .volatile_reg = wm8940_volatile_register, 749 .volatile_reg = wm8940_volatile_register,
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 0f66fda2c772..237dc67002ef 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -1513,8 +1513,9 @@ static struct davinci_mcasp_pdata am33xx_mcasp_pdata = {
1513}; 1513};
1514 1514
1515static struct davinci_mcasp_pdata dra7_mcasp_pdata = { 1515static struct davinci_mcasp_pdata dra7_mcasp_pdata = {
1516 .tx_dma_offset = 0x200, 1516 /* The CFG port offset will be calculated if it is needed */
1517 .rx_dma_offset = 0x284, 1517 .tx_dma_offset = 0,
1518 .rx_dma_offset = 0,
1518 .version = MCASP_VERSION_4, 1519 .version = MCASP_VERSION_4,
1519}; 1520};
1520 1521
@@ -1734,6 +1735,52 @@ static int davinci_mcasp_get_dma_type(struct davinci_mcasp *mcasp)
1734 return PCM_EDMA; 1735 return PCM_EDMA;
1735} 1736}
1736 1737
1738static u32 davinci_mcasp_txdma_offset(struct davinci_mcasp_pdata *pdata)
1739{
1740 int i;
1741 u32 offset = 0;
1742
1743 if (pdata->version != MCASP_VERSION_4)
1744 return pdata->tx_dma_offset;
1745
1746 for (i = 0; i < pdata->num_serializer; i++) {
1747 if (pdata->serial_dir[i] == TX_MODE) {
1748 if (!offset) {
1749 offset = DAVINCI_MCASP_TXBUF_REG(i);
1750 } else {
1751 pr_err("%s: Only one serializer allowed!\n",
1752 __func__);
1753 break;
1754 }
1755 }
1756 }
1757
1758 return offset;
1759}
1760
1761static u32 davinci_mcasp_rxdma_offset(struct davinci_mcasp_pdata *pdata)
1762{
1763 int i;
1764 u32 offset = 0;
1765
1766 if (pdata->version != MCASP_VERSION_4)
1767 return pdata->rx_dma_offset;
1768
1769 for (i = 0; i < pdata->num_serializer; i++) {
1770 if (pdata->serial_dir[i] == RX_MODE) {
1771 if (!offset) {
1772 offset = DAVINCI_MCASP_RXBUF_REG(i);
1773 } else {
1774 pr_err("%s: Only one serializer allowed!\n",
1775 __func__);
1776 break;
1777 }
1778 }
1779 }
1780
1781 return offset;
1782}
1783
1737static int davinci_mcasp_probe(struct platform_device *pdev) 1784static int davinci_mcasp_probe(struct platform_device *pdev)
1738{ 1785{
1739 struct snd_dmaengine_dai_dma_data *dma_data; 1786 struct snd_dmaengine_dai_dma_data *dma_data;
@@ -1862,7 +1909,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1862 if (dat) 1909 if (dat)
1863 dma_data->addr = dat->start; 1910 dma_data->addr = dat->start;
1864 else 1911 else
1865 dma_data->addr = mem->start + pdata->tx_dma_offset; 1912 dma_data->addr = mem->start + davinci_mcasp_txdma_offset(pdata);
1866 1913
1867 dma = &mcasp->dma_request[SNDRV_PCM_STREAM_PLAYBACK]; 1914 dma = &mcasp->dma_request[SNDRV_PCM_STREAM_PLAYBACK];
1868 res = platform_get_resource(pdev, IORESOURCE_DMA, 0); 1915 res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
@@ -1883,7 +1930,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1883 if (dat) 1930 if (dat)
1884 dma_data->addr = dat->start; 1931 dma_data->addr = dat->start;
1885 else 1932 else
1886 dma_data->addr = mem->start + pdata->rx_dma_offset; 1933 dma_data->addr =
1934 mem->start + davinci_mcasp_rxdma_offset(pdata);
1887 1935
1888 dma = &mcasp->dma_request[SNDRV_PCM_STREAM_CAPTURE]; 1936 dma = &mcasp->dma_request[SNDRV_PCM_STREAM_CAPTURE];
1889 res = platform_get_resource(pdev, IORESOURCE_DMA, 1); 1937 res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
diff --git a/sound/soc/davinci/davinci-mcasp.h b/sound/soc/davinci/davinci-mcasp.h
index 1e8787fb3fb7..afddc8010c54 100644
--- a/sound/soc/davinci/davinci-mcasp.h
+++ b/sound/soc/davinci/davinci-mcasp.h
@@ -85,9 +85,9 @@
85 (n << 2)) 85 (n << 2))
86 86
87/* Transmit Buffer for Serializer n */ 87/* Transmit Buffer for Serializer n */
88#define DAVINCI_MCASP_TXBUF_REG 0x200 88#define DAVINCI_MCASP_TXBUF_REG(n) (0x200 + (n << 2))
89/* Receive Buffer for Serializer n */ 89/* Receive Buffer for Serializer n */
90#define DAVINCI_MCASP_RXBUF_REG 0x280 90#define DAVINCI_MCASP_RXBUF_REG(n) (0x280 + (n << 2))
91 91
92/* McASP FIFO Registers */ 92/* McASP FIFO Registers */
93#define DAVINCI_MCASP_V2_AFIFO_BASE (0x1010) 93#define DAVINCI_MCASP_V2_AFIFO_BASE (0x1010)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 632ecc0e3956..bedec4a32581 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -952,16 +952,16 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev,
952 ssi_private->i2s_mode = CCSR_SSI_SCR_NET; 952 ssi_private->i2s_mode = CCSR_SSI_SCR_NET;
953 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { 953 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
954 case SND_SOC_DAIFMT_I2S: 954 case SND_SOC_DAIFMT_I2S:
955 regmap_update_bits(regs, CCSR_SSI_STCCR,
956 CCSR_SSI_SxCCR_DC_MASK,
957 CCSR_SSI_SxCCR_DC(2));
958 regmap_update_bits(regs, CCSR_SSI_SRCCR,
959 CCSR_SSI_SxCCR_DC_MASK,
960 CCSR_SSI_SxCCR_DC(2));
955 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 961 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
956 case SND_SOC_DAIFMT_CBM_CFS: 962 case SND_SOC_DAIFMT_CBM_CFS:
957 case SND_SOC_DAIFMT_CBS_CFS: 963 case SND_SOC_DAIFMT_CBS_CFS:
958 ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_MASTER; 964 ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_MASTER;
959 regmap_update_bits(regs, CCSR_SSI_STCCR,
960 CCSR_SSI_SxCCR_DC_MASK,
961 CCSR_SSI_SxCCR_DC(2));
962 regmap_update_bits(regs, CCSR_SSI_SRCCR,
963 CCSR_SSI_SxCCR_DC_MASK,
964 CCSR_SSI_SxCCR_DC(2));
965 break; 965 break;
966 case SND_SOC_DAIFMT_CBM_CFM: 966 case SND_SOC_DAIFMT_CBM_CFM:
967 ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_SLAVE; 967 ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_SLAVE;
diff --git a/sound/soc/intel/atom/sst-mfld-platform-compress.c b/sound/soc/intel/atom/sst-mfld-platform-compress.c
index 395168986462..1bead81bb510 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-compress.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-compress.c
@@ -182,24 +182,29 @@ static int sst_platform_compr_trigger(struct snd_compr_stream *cstream, int cmd)
182 case SNDRV_PCM_TRIGGER_START: 182 case SNDRV_PCM_TRIGGER_START:
183 if (stream->compr_ops->stream_start) 183 if (stream->compr_ops->stream_start)
184 return stream->compr_ops->stream_start(sst->dev, stream->id); 184 return stream->compr_ops->stream_start(sst->dev, stream->id);
185 break;
185 case SNDRV_PCM_TRIGGER_STOP: 186 case SNDRV_PCM_TRIGGER_STOP:
186 if (stream->compr_ops->stream_drop) 187 if (stream->compr_ops->stream_drop)
187 return stream->compr_ops->stream_drop(sst->dev, stream->id); 188 return stream->compr_ops->stream_drop(sst->dev, stream->id);
189 break;
188 case SND_COMPR_TRIGGER_DRAIN: 190 case SND_COMPR_TRIGGER_DRAIN:
189 if (stream->compr_ops->stream_drain) 191 if (stream->compr_ops->stream_drain)
190 return stream->compr_ops->stream_drain(sst->dev, stream->id); 192 return stream->compr_ops->stream_drain(sst->dev, stream->id);
193 break;
191 case SND_COMPR_TRIGGER_PARTIAL_DRAIN: 194 case SND_COMPR_TRIGGER_PARTIAL_DRAIN:
192 if (stream->compr_ops->stream_partial_drain) 195 if (stream->compr_ops->stream_partial_drain)
193 return stream->compr_ops->stream_partial_drain(sst->dev, stream->id); 196 return stream->compr_ops->stream_partial_drain(sst->dev, stream->id);
197 break;
194 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 198 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
195 if (stream->compr_ops->stream_pause) 199 if (stream->compr_ops->stream_pause)
196 return stream->compr_ops->stream_pause(sst->dev, stream->id); 200 return stream->compr_ops->stream_pause(sst->dev, stream->id);
201 break;
197 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 202 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
198 if (stream->compr_ops->stream_pause_release) 203 if (stream->compr_ops->stream_pause_release)
199 return stream->compr_ops->stream_pause_release(sst->dev, stream->id); 204 return stream->compr_ops->stream_pause_release(sst->dev, stream->id);
200 default: 205 break;
201 return -EINVAL;
202 } 206 }
207 return -EINVAL;
203} 208}
204 209
205static int sst_platform_compr_pointer(struct snd_compr_stream *cstream, 210static int sst_platform_compr_pointer(struct snd_compr_stream *cstream,
diff --git a/sound/soc/intel/skylake/bxt-sst.c b/sound/soc/intel/skylake/bxt-sst.c
index 965ce40ce752..8b95e09e23e8 100644
--- a/sound/soc/intel/skylake/bxt-sst.c
+++ b/sound/soc/intel/skylake/bxt-sst.c
@@ -291,6 +291,7 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
291 sst_dsp_mailbox_init(sst, (BXT_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ), 291 sst_dsp_mailbox_init(sst, (BXT_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ),
292 SKL_ADSP_W0_UP_SZ, BXT_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ); 292 SKL_ADSP_W0_UP_SZ, BXT_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ);
293 293
294 INIT_LIST_HEAD(&sst->module_list);
294 ret = skl_ipc_init(dev, skl); 295 ret = skl_ipc_init(dev, skl);
295 if (ret) 296 if (ret)
296 return ret; 297 return ret;
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 49354d17ea55..c4c51a4d3c8f 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -518,7 +518,7 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
518 } 518 }
519 } 519 }
520 520
521 rsnd_mod_bset(adg_mod, SSICKR, 0x00FF0000, ckr); 521 rsnd_mod_bset(adg_mod, SSICKR, 0x80FF0000, ckr);
522 rsnd_mod_write(adg_mod, BRRA, rbga); 522 rsnd_mod_write(adg_mod, BRRA, rbga);
523 rsnd_mod_write(adg_mod, BRRB, rbgb); 523 rsnd_mod_write(adg_mod, BRRB, rbgb);
524 524
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 69860da473ea..9e5276d6dda0 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -556,7 +556,6 @@ static int usb_audio_probe(struct usb_interface *intf,
556 goto __error; 556 goto __error;
557 } 557 }
558 chip = usb_chip[i]; 558 chip = usb_chip[i];
559 dev_set_drvdata(&dev->dev, chip);
560 atomic_inc(&chip->active); /* avoid autopm */ 559 atomic_inc(&chip->active); /* avoid autopm */
561 break; 560 break;
562 } 561 }
@@ -582,6 +581,7 @@ static int usb_audio_probe(struct usb_interface *intf,
582 goto __error; 581 goto __error;
583 } 582 }
584 } 583 }
584 dev_set_drvdata(&dev->dev, chip);
585 585
586 /* 586 /*
587 * For devices with more than one control interface, we assume the 587 * For devices with more than one control interface, we assume the