Skip to content

Commit 71dc96e

Browse files
committed
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
2 parents ed8c37e + 6ba736d commit 71dc96e

File tree

16 files changed

+52
-40
lines changed

16 files changed

+52
-40
lines changed

Documentation/devicetree/bindings/sound/tlv320aic31xx.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Required properties:
1313
"ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP)
1414

1515
- 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
1619

1720

1821
Optional properties:
@@ -24,9 +27,6 @@ Optional properties:
2427
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD
2528
If this node is not mentioned or if the value is unknown, then
2629
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
3030

3131
CODEC output pins:
3232
* HPL

sound/pci/hda/hda_controller.c

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,24 +1059,26 @@ static void azx_init_cmd_io(struct azx *chip)
10591059

10601060
/* reset the corb hw read pointer */
10611061
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));
10701071

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));
10761081
}
1077-
if (timeout <= 0)
1078-
dev_err(chip->card->dev, "CORB reset timeout#2, CORBRP = %d\n",
1079-
azx_readw(chip, CORBRP));
10801082

10811083
/* enable corb dma */
10821084
azx_writeb(chip, CORBCTL, ICH6_CORBCTL_RUN);

sound/pci/hda/hda_intel.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ enum {
249249
/* quirks for Nvidia */
250250
#define AZX_DCAPS_PRESET_NVIDIA \
251251
(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)
253254

254255
#define AZX_DCAPS_PRESET_CTHDA \
255256
(AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY)

sound/pci/hda/hda_priv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
189189
#define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */
190190
#define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */
191191
#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 */
192193

193194
/* position fix mode */
194195
enum {

sound/pci/hda/patch_realtek.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4621,6 +4621,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
46214621
SND_PCI_QUIRK(0x1028, 0x0667, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
46224622
SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE),
46234623
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),
46244625
SND_PCI_QUIRK(0x1028, 0x067f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
46254626
SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
46264627
SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),

sound/soc/codecs/alc5623.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,13 +1018,13 @@ static int alc5623_i2c_probe(struct i2c_client *client,
10181018
dev_err(&client->dev, "failed to read vendor ID1: %d\n", ret);
10191019
return ret;
10201020
}
1021-
vid1 = ((vid1 & 0xff) << 8) | (vid1 >> 8);
10221021

10231022
ret = regmap_read(alc5623->regmap, ALC5623_VENDOR_ID2, &vid2);
10241023
if (ret < 0) {
10251024
dev_err(&client->dev, "failed to read vendor ID2: %d\n", ret);
10261025
return ret;
10271026
}
1027+
vid2 >>= 8;
10281028

10291029
if ((vid1 != 0x10ec) || (vid2 != id->driver_data)) {
10301030
dev_err(&client->dev, "unknown or wrong codec\n");

sound/soc/codecs/cs42l52.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,8 +1229,10 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
12291229
}
12301230

12311231
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");
12341236
if (ret < 0) {
12351237
dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n",
12361238
cs42l52->pdata.reset_gpio, ret);

sound/soc/codecs/cs42l73.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,8 +1443,10 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
14431443
i2c_set_clientdata(i2c_client, cs42l73);
14441444

14451445
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");
14481450
if (ret < 0) {
14491451
dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n",
14501452
cs42l73->pdata.reset_gpio, ret);

sound/soc/codecs/tlv320aic3x.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,6 @@ static int aic3x_probe(struct snd_soc_codec *codec)
13991399
}
14001400

14011401
aic3x_add_widgets(codec);
1402-
list_add(&aic3x->list, &reset_list);
14031402

14041403
return 0;
14051404

@@ -1569,7 +1568,13 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
15691568

15701569
ret = snd_soc_register_codec(&i2c->dev,
15711570
&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;
15731578

15741579
err_gpio:
15751580
if (gpio_is_valid(aic3x->gpio_reset) &&

sound/soc/fsl/fsl_spdif.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ enum spdif_gainsel {
144144

145145
/* SPDIF Clock register */
146146
#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)
149149
#define STC_TXCLK_SRC_OFFSET 8
150150
#define STC_TXCLK_SRC_MASK (0x7 << STC_TXCLK_SRC_OFFSET)
151151
#define STC_TXCLK_SRC_SET(x) ((x << STC_TXCLK_SRC_OFFSET) & STC_TXCLK_SRC_MASK)

sound/soc/intel/sst-dsp-priv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ struct sst_module_data {
136136
enum sst_data_type data_type; /* type of module data */
137137

138138
u32 size; /* size in bytes */
139-
u32 offset; /* offset in FW file */
139+
int32_t offset; /* offset in FW file */
140140
u32 data_offset; /* offset in ADSP memory space */
141141
void *data; /* module data */
142142
};

sound/soc/intel/sst-haswell-ipc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ static void hsw_notification_work(struct work_struct *work)
617617
case IPC_POSITION_CHANGED:
618618
trace_ipc_notification("DSP stream position changed for",
619619
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));
621621

622622
if (stream->notify_position)
623623
stream->notify_position(stream, stream->pdata);
@@ -991,7 +991,8 @@ int sst_hsw_stream_get_volume(struct sst_hsw *hsw, struct sst_hsw_stream *stream
991991
return -EINVAL;
992992

993993
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));
995996

996997
return 0;
997998
}
@@ -1609,7 +1610,7 @@ int sst_hsw_dx_set_state(struct sst_hsw *hsw,
16091610
trace_ipc_request("PM enter Dx state", state);
16101611

16111612
ret = ipc_tx_message_wait(hsw, header, &state_, sizeof(state_),
1612-
dx, sizeof(dx));
1613+
dx, sizeof(*dx));
16131614
if (ret < 0) {
16141615
dev_err(hsw->dev, "ipc: error set dx state %d failed\n", state);
16151616
return ret;

sound/soc/jz4740/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#
22
# Jz4740 Platform Support
33
#
4-
snd-soc-jz4740-objs := jz4740-pcm.o
54
snd-soc-jz4740-i2s-objs := jz4740-i2s.o
65

7-
obj-$(CONFIG_SND_JZ4740_SOC) += snd-soc-jz4740.o
86
obj-$(CONFIG_SND_JZ4740_SOC_I2S) += snd-soc-jz4740-i2s.o
97

108
# Jz4740 Machine Support

sound/soc/sh/rcar/src.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static int rsnd_src_init(struct rsnd_mod *mod,
258258
{
259259
struct rsnd_src *src = rsnd_mod_to_src(mod);
260260

261-
clk_enable(src->clk);
261+
clk_prepare_enable(src->clk);
262262

263263
return 0;
264264
}
@@ -269,7 +269,7 @@ static int rsnd_src_quit(struct rsnd_mod *mod,
269269
{
270270
struct rsnd_src *src = rsnd_mod_to_src(mod);
271271

272-
clk_disable(src->clk);
272+
clk_disable_unprepare(src->clk);
273273

274274
return 0;
275275
}

sound/soc/sh/rcar/ssi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi,
171171
u32 cr;
172172

173173
if (0 == ssi->usrcnt) {
174-
clk_enable(ssi->clk);
174+
clk_prepare_enable(ssi->clk);
175175

176176
if (rsnd_dai_is_clk_master(rdai)) {
177177
if (rsnd_ssi_clk_from_parent(ssi))
@@ -230,7 +230,7 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi,
230230
rsnd_ssi_master_clk_stop(ssi);
231231
}
232232

233-
clk_disable(ssi->clk);
233+
clk_disable_unprepare(ssi->clk);
234234
}
235235

236236
dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod));

sound/soc/soc-dapm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,
254254
static void dapm_kcontrol_free(struct snd_kcontrol *kctl)
255255
{
256256
struct dapm_kcontrol_data *data = snd_kcontrol_chip(kctl);
257-
kfree(data->widget);
258257
kfree(data->wlist);
259258
kfree(data);
260259
}

0 commit comments

Comments
 (0)