Commit 71dc96e39d0a81854303dd498b4eafa7d1d90f81
Exists in
master
and in
13 other branches
Merge tag 'sound-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A few collections of small eggs that have been gathered during the Easter holidays. Mostly small ASoC fixes, with a HD-audio quirk and a workaround for Nvidia controller" * tag 'sound-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Suppress CORBRP clear on Nvidia controller chips ALSA: hda - add headset mic detect quirk for a Dell laptop ASoC: jz4740: Remove Makefile entry for removed file ASoC: Intel: Fix audio crash due to negative address offset ASoC: dapm: Fix widget double free with auto-disable DAPM kcontrol ASoC: Intel: Fix incorrect sizeof() in sst_hsw_stream_get_volume() ASoC: Intel: some incorrect sizeof() usages ASoC: cs42l73: Convert to use devm_gpio_request_one ASoC: cs42l52: Convert to use devm_gpio_request_one ASoC: tlv320aic31xx: document that the regulators are mandatory ASoC: fsl_spdif: Fix wrong OFFSET of STC_SYSCLK_DIV ASoC: alc5623: Fix regmap endianness ASoC: tlv320aic3x: fix shared reset pin for DT ASoC: rsnd: fix clock prepare/unprepare
Showing 16 changed files Side-by-side Diff
- Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
- sound/pci/hda/hda_controller.c
- sound/pci/hda/hda_intel.c
- sound/pci/hda/hda_priv.h
- sound/pci/hda/patch_realtek.c
- sound/soc/codecs/alc5623.c
- sound/soc/codecs/cs42l52.c
- sound/soc/codecs/cs42l73.c
- sound/soc/codecs/tlv320aic3x.c
- sound/soc/fsl/fsl_spdif.h
- sound/soc/intel/sst-dsp-priv.h
- sound/soc/intel/sst-haswell-ipc.c
- sound/soc/jz4740/Makefile
- sound/soc/sh/rcar/src.c
- sound/soc/sh/rcar/ssi.c
- sound/soc/soc-dapm.c
Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
... | ... | @@ -13,6 +13,9 @@ |
13 | 13 | "ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP) |
14 | 14 | |
15 | 15 | - reg - <int> - I2C slave address |
16 | +- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply, | |
17 | + DVDD-supply : power supplies for the device as covered in | |
18 | + Documentation/devicetree/bindings/regulator/regulator.txt | |
16 | 19 | |
17 | 20 | |
18 | 21 | Optional properties: |
... | ... | @@ -24,9 +27,6 @@ |
24 | 27 | 3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD |
25 | 28 | If this node is not mentioned or if the value is unknown, then |
26 | 29 | micbias is set to 2.0V. |
27 | -- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply, | |
28 | - DVDD-supply : power supplies for the device as covered in | |
29 | - Documentation/devicetree/bindings/regulator/regulator.txt | |
30 | 30 | |
31 | 31 | CODEC output pins: |
32 | 32 | * HPL |
sound/pci/hda/hda_controller.c
... | ... | @@ -1059,24 +1059,26 @@ |
1059 | 1059 | |
1060 | 1060 | /* reset the corb hw read pointer */ |
1061 | 1061 | azx_writew(chip, CORBRP, ICH6_CORBRP_RST); |
1062 | - for (timeout = 1000; timeout > 0; timeout--) { | |
1063 | - if ((azx_readw(chip, CORBRP) & ICH6_CORBRP_RST) == ICH6_CORBRP_RST) | |
1064 | - break; | |
1065 | - udelay(1); | |
1066 | - } | |
1067 | - if (timeout <= 0) | |
1068 | - dev_err(chip->card->dev, "CORB reset timeout#1, CORBRP = %d\n", | |
1069 | - azx_readw(chip, CORBRP)); | |
1062 | + if (!(chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR)) { | |
1063 | + for (timeout = 1000; timeout > 0; timeout--) { | |
1064 | + if ((azx_readw(chip, CORBRP) & ICH6_CORBRP_RST) == ICH6_CORBRP_RST) | |
1065 | + break; | |
1066 | + udelay(1); | |
1067 | + } | |
1068 | + if (timeout <= 0) | |
1069 | + dev_err(chip->card->dev, "CORB reset timeout#1, CORBRP = %d\n", | |
1070 | + azx_readw(chip, CORBRP)); | |
1070 | 1071 | |
1071 | - azx_writew(chip, CORBRP, 0); | |
1072 | - for (timeout = 1000; timeout > 0; timeout--) { | |
1073 | - if (azx_readw(chip, CORBRP) == 0) | |
1074 | - break; | |
1075 | - udelay(1); | |
1072 | + azx_writew(chip, CORBRP, 0); | |
1073 | + for (timeout = 1000; timeout > 0; timeout--) { | |
1074 | + if (azx_readw(chip, CORBRP) == 0) | |
1075 | + break; | |
1076 | + udelay(1); | |
1077 | + } | |
1078 | + if (timeout <= 0) | |
1079 | + dev_err(chip->card->dev, "CORB reset timeout#2, CORBRP = %d\n", | |
1080 | + azx_readw(chip, CORBRP)); | |
1076 | 1081 | } |
1077 | - if (timeout <= 0) | |
1078 | - dev_err(chip->card->dev, "CORB reset timeout#2, CORBRP = %d\n", | |
1079 | - azx_readw(chip, CORBRP)); | |
1080 | 1082 | |
1081 | 1083 | /* enable corb dma */ |
1082 | 1084 | azx_writeb(chip, CORBCTL, ICH6_CORBCTL_RUN); |
sound/pci/hda/hda_intel.c
... | ... | @@ -249,7 +249,8 @@ |
249 | 249 | /* quirks for Nvidia */ |
250 | 250 | #define AZX_DCAPS_PRESET_NVIDIA \ |
251 | 251 | (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI |\ |
252 | - AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_NO_64BIT) | |
252 | + AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_NO_64BIT |\ | |
253 | + AZX_DCAPS_CORBRP_SELF_CLEAR) | |
253 | 254 | |
254 | 255 | #define AZX_DCAPS_PRESET_CTHDA \ |
255 | 256 | (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY) |
sound/pci/hda/hda_priv.h
... | ... | @@ -189,6 +189,7 @@ |
189 | 189 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ |
190 | 190 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ |
191 | 191 | #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ |
192 | +#define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */ | |
192 | 193 | |
193 | 194 | /* position fix mode */ |
194 | 195 | enum { |
sound/pci/hda/patch_realtek.c
... | ... | @@ -4621,6 +4621,7 @@ |
4621 | 4621 | SND_PCI_QUIRK(0x1028, 0x0667, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4622 | 4622 | SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), |
4623 | 4623 | SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), |
4624 | + SND_PCI_QUIRK(0x1028, 0x0674, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | |
4624 | 4625 | SND_PCI_QUIRK(0x1028, 0x067f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4625 | 4626 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4626 | 4627 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
sound/soc/codecs/alc5623.c
... | ... | @@ -1018,13 +1018,13 @@ |
1018 | 1018 | dev_err(&client->dev, "failed to read vendor ID1: %d\n", ret); |
1019 | 1019 | return ret; |
1020 | 1020 | } |
1021 | - vid1 = ((vid1 & 0xff) << 8) | (vid1 >> 8); | |
1022 | 1021 | |
1023 | 1022 | ret = regmap_read(alc5623->regmap, ALC5623_VENDOR_ID2, &vid2); |
1024 | 1023 | if (ret < 0) { |
1025 | 1024 | dev_err(&client->dev, "failed to read vendor ID2: %d\n", ret); |
1026 | 1025 | return ret; |
1027 | 1026 | } |
1027 | + vid2 >>= 8; | |
1028 | 1028 | |
1029 | 1029 | if ((vid1 != 0x10ec) || (vid2 != id->driver_data)) { |
1030 | 1030 | dev_err(&client->dev, "unknown or wrong codec\n"); |
sound/soc/codecs/cs42l52.c
... | ... | @@ -1229,8 +1229,10 @@ |
1229 | 1229 | } |
1230 | 1230 | |
1231 | 1231 | if (cs42l52->pdata.reset_gpio) { |
1232 | - ret = gpio_request_one(cs42l52->pdata.reset_gpio, | |
1233 | - GPIOF_OUT_INIT_HIGH, "CS42L52 /RST"); | |
1232 | + ret = devm_gpio_request_one(&i2c_client->dev, | |
1233 | + cs42l52->pdata.reset_gpio, | |
1234 | + GPIOF_OUT_INIT_HIGH, | |
1235 | + "CS42L52 /RST"); | |
1234 | 1236 | if (ret < 0) { |
1235 | 1237 | dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", |
1236 | 1238 | cs42l52->pdata.reset_gpio, ret); |
sound/soc/codecs/cs42l73.c
... | ... | @@ -1443,8 +1443,10 @@ |
1443 | 1443 | i2c_set_clientdata(i2c_client, cs42l73); |
1444 | 1444 | |
1445 | 1445 | if (cs42l73->pdata.reset_gpio) { |
1446 | - ret = gpio_request_one(cs42l73->pdata.reset_gpio, | |
1447 | - GPIOF_OUT_INIT_HIGH, "CS42L73 /RST"); | |
1446 | + ret = devm_gpio_request_one(&i2c_client->dev, | |
1447 | + cs42l73->pdata.reset_gpio, | |
1448 | + GPIOF_OUT_INIT_HIGH, | |
1449 | + "CS42L73 /RST"); | |
1448 | 1450 | if (ret < 0) { |
1449 | 1451 | dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", |
1450 | 1452 | cs42l73->pdata.reset_gpio, ret); |
sound/soc/codecs/tlv320aic3x.c
... | ... | @@ -1399,7 +1399,6 @@ |
1399 | 1399 | } |
1400 | 1400 | |
1401 | 1401 | aic3x_add_widgets(codec); |
1402 | - list_add(&aic3x->list, &reset_list); | |
1403 | 1402 | |
1404 | 1403 | return 0; |
1405 | 1404 | |
... | ... | @@ -1569,7 +1568,13 @@ |
1569 | 1568 | |
1570 | 1569 | ret = snd_soc_register_codec(&i2c->dev, |
1571 | 1570 | &soc_codec_dev_aic3x, &aic3x_dai, 1); |
1572 | - return ret; | |
1571 | + | |
1572 | + if (ret != 0) | |
1573 | + goto err_gpio; | |
1574 | + | |
1575 | + list_add(&aic3x->list, &reset_list); | |
1576 | + | |
1577 | + return 0; | |
1573 | 1578 | |
1574 | 1579 | err_gpio: |
1575 | 1580 | if (gpio_is_valid(aic3x->gpio_reset) && |
sound/soc/fsl/fsl_spdif.h
... | ... | @@ -144,8 +144,8 @@ |
144 | 144 | |
145 | 145 | /* SPDIF Clock register */ |
146 | 146 | #define STC_SYSCLK_DIV_OFFSET 11 |
147 | -#define STC_SYSCLK_DIV_MASK (0x1ff << STC_TXCLK_SRC_OFFSET) | |
148 | -#define STC_SYSCLK_DIV(x) ((((x) - 1) << STC_TXCLK_DIV_OFFSET) & STC_SYSCLK_DIV_MASK) | |
147 | +#define STC_SYSCLK_DIV_MASK (0x1ff << STC_SYSCLK_DIV_OFFSET) | |
148 | +#define STC_SYSCLK_DIV(x) ((((x) - 1) << STC_SYSCLK_DIV_OFFSET) & STC_SYSCLK_DIV_MASK) | |
149 | 149 | #define STC_TXCLK_SRC_OFFSET 8 |
150 | 150 | #define STC_TXCLK_SRC_MASK (0x7 << STC_TXCLK_SRC_OFFSET) |
151 | 151 | #define STC_TXCLK_SRC_SET(x) ((x << STC_TXCLK_SRC_OFFSET) & STC_TXCLK_SRC_MASK) |
sound/soc/intel/sst-dsp-priv.h
... | ... | @@ -136,7 +136,7 @@ |
136 | 136 | enum sst_data_type data_type; /* type of module data */ |
137 | 137 | |
138 | 138 | u32 size; /* size in bytes */ |
139 | - u32 offset; /* offset in FW file */ | |
139 | + int32_t offset; /* offset in FW file */ | |
140 | 140 | u32 data_offset; /* offset in ADSP memory space */ |
141 | 141 | void *data; /* module data */ |
142 | 142 | }; |
sound/soc/intel/sst-haswell-ipc.c
... | ... | @@ -617,7 +617,7 @@ |
617 | 617 | case IPC_POSITION_CHANGED: |
618 | 618 | trace_ipc_notification("DSP stream position changed for", |
619 | 619 | stream->reply.stream_hw_id); |
620 | - sst_dsp_inbox_read(hsw->dsp, pos, sizeof(pos)); | |
620 | + sst_dsp_inbox_read(hsw->dsp, pos, sizeof(*pos)); | |
621 | 621 | |
622 | 622 | if (stream->notify_position) |
623 | 623 | stream->notify_position(stream, stream->pdata); |
... | ... | @@ -991,7 +991,8 @@ |
991 | 991 | return -EINVAL; |
992 | 992 | |
993 | 993 | sst_dsp_read(hsw->dsp, volume, |
994 | - stream->reply.volume_register_address[channel], sizeof(volume)); | |
994 | + stream->reply.volume_register_address[channel], | |
995 | + sizeof(*volume)); | |
995 | 996 | |
996 | 997 | return 0; |
997 | 998 | } |
... | ... | @@ -1609,7 +1610,7 @@ |
1609 | 1610 | trace_ipc_request("PM enter Dx state", state); |
1610 | 1611 | |
1611 | 1612 | ret = ipc_tx_message_wait(hsw, header, &state_, sizeof(state_), |
1612 | - dx, sizeof(dx)); | |
1613 | + dx, sizeof(*dx)); | |
1613 | 1614 | if (ret < 0) { |
1614 | 1615 | dev_err(hsw->dev, "ipc: error set dx state %d failed\n", state); |
1615 | 1616 | return ret; |
sound/soc/jz4740/Makefile
sound/soc/sh/rcar/src.c
... | ... | @@ -258,7 +258,7 @@ |
258 | 258 | { |
259 | 259 | struct rsnd_src *src = rsnd_mod_to_src(mod); |
260 | 260 | |
261 | - clk_enable(src->clk); | |
261 | + clk_prepare_enable(src->clk); | |
262 | 262 | |
263 | 263 | return 0; |
264 | 264 | } |
... | ... | @@ -269,7 +269,7 @@ |
269 | 269 | { |
270 | 270 | struct rsnd_src *src = rsnd_mod_to_src(mod); |
271 | 271 | |
272 | - clk_disable(src->clk); | |
272 | + clk_disable_unprepare(src->clk); | |
273 | 273 | |
274 | 274 | return 0; |
275 | 275 | } |
sound/soc/sh/rcar/ssi.c
... | ... | @@ -171,7 +171,7 @@ |
171 | 171 | u32 cr; |
172 | 172 | |
173 | 173 | if (0 == ssi->usrcnt) { |
174 | - clk_enable(ssi->clk); | |
174 | + clk_prepare_enable(ssi->clk); | |
175 | 175 | |
176 | 176 | if (rsnd_dai_is_clk_master(rdai)) { |
177 | 177 | if (rsnd_ssi_clk_from_parent(ssi)) |
... | ... | @@ -230,7 +230,7 @@ |
230 | 230 | rsnd_ssi_master_clk_stop(ssi); |
231 | 231 | } |
232 | 232 | |
233 | - clk_disable(ssi->clk); | |
233 | + clk_disable_unprepare(ssi->clk); | |
234 | 234 | } |
235 | 235 | |
236 | 236 | dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod)); |
sound/soc/soc-dapm.c