diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-05-05 10:54:33 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-05 10:54:33 -0400 |
commit | 59991da498122f779434c4e0beac8a69e0322938 (patch) | |
tree | 23e46bc7f355c6d65f3246f756cd8ef84cfc3030 /sound | |
parent | 02fd1a76bfeb8d6293608dc3a1b8667b1da5a923 (diff) | |
parent | f06ab794af7055d0949b09885f79f8b493deec64 (diff) |
Merge branch 'for-linus' into for-next
... for applying the further HDMI fixes.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/isa/es18xx.c | 10 | ||||
-rw-r--r-- | sound/pci/hda/hda_controller.c | 34 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_priv.h | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 5 | ||||
-rw-r--r-- | sound/soc/codecs/alc5623.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l52.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l73.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 9 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_spdif.h | 4 | ||||
-rw-r--r-- | sound/soc/intel/sst-dsp-priv.h | 2 | ||||
-rw-r--r-- | sound/soc/intel/sst-haswell-ipc.c | 7 | ||||
-rw-r--r-- | sound/soc/jz4740/Makefile | 2 | ||||
-rw-r--r-- | sound/soc/sh/rcar/src.c | 4 | ||||
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 4 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 1 | ||||
-rw-r--r-- | sound/usb/card.c | 12 | ||||
-rw-r--r-- | sound/usb/card.h | 1 | ||||
-rw-r--r-- | sound/usb/endpoint.c | 15 | ||||
-rw-r--r-- | sound/usb/pcm.c | 5 | ||||
-rw-r--r-- | sound/usb/usbaudio.h | 1 |
22 files changed, 87 insertions, 51 deletions
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 1c16830af3d8..6faaac60161a 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c | |||
@@ -520,7 +520,7 @@ static int snd_es18xx_playback1_trigger(struct snd_es18xx *chip, | |||
520 | snd_es18xx_mixer_write(chip, 0x78, 0x93); | 520 | snd_es18xx_mixer_write(chip, 0x78, 0x93); |
521 | #ifdef AVOID_POPS | 521 | #ifdef AVOID_POPS |
522 | /* Avoid pops */ | 522 | /* Avoid pops */ |
523 | udelay(100000); | 523 | mdelay(100); |
524 | if (chip->caps & ES18XX_PCM2) | 524 | if (chip->caps & ES18XX_PCM2) |
525 | /* Restore Audio 2 volume */ | 525 | /* Restore Audio 2 volume */ |
526 | snd_es18xx_mixer_write(chip, 0x7C, chip->audio2_vol); | 526 | snd_es18xx_mixer_write(chip, 0x7C, chip->audio2_vol); |
@@ -537,7 +537,7 @@ static int snd_es18xx_playback1_trigger(struct snd_es18xx *chip, | |||
537 | /* Stop DMA */ | 537 | /* Stop DMA */ |
538 | snd_es18xx_mixer_write(chip, 0x78, 0x00); | 538 | snd_es18xx_mixer_write(chip, 0x78, 0x00); |
539 | #ifdef AVOID_POPS | 539 | #ifdef AVOID_POPS |
540 | udelay(25000); | 540 | mdelay(25); |
541 | if (chip->caps & ES18XX_PCM2) | 541 | if (chip->caps & ES18XX_PCM2) |
542 | /* Set Audio 2 volume to 0 */ | 542 | /* Set Audio 2 volume to 0 */ |
543 | snd_es18xx_mixer_write(chip, 0x7C, 0); | 543 | snd_es18xx_mixer_write(chip, 0x7C, 0); |
@@ -596,7 +596,7 @@ static int snd_es18xx_capture_prepare(struct snd_pcm_substream *substream) | |||
596 | snd_es18xx_write(chip, 0xA5, count >> 8); | 596 | snd_es18xx_write(chip, 0xA5, count >> 8); |
597 | 597 | ||
598 | #ifdef AVOID_POPS | 598 | #ifdef AVOID_POPS |
599 | udelay(100000); | 599 | mdelay(100); |
600 | #endif | 600 | #endif |
601 | 601 | ||
602 | /* Set format */ | 602 | /* Set format */ |
@@ -691,7 +691,7 @@ static int snd_es18xx_playback2_trigger(struct snd_es18xx *chip, | |||
691 | snd_es18xx_write(chip, 0xB8, 0x05); | 691 | snd_es18xx_write(chip, 0xB8, 0x05); |
692 | #ifdef AVOID_POPS | 692 | #ifdef AVOID_POPS |
693 | /* Avoid pops */ | 693 | /* Avoid pops */ |
694 | udelay(100000); | 694 | mdelay(100); |
695 | /* Enable Audio 1 */ | 695 | /* Enable Audio 1 */ |
696 | snd_es18xx_dsp_command(chip, 0xD1); | 696 | snd_es18xx_dsp_command(chip, 0xD1); |
697 | #endif | 697 | #endif |
@@ -705,7 +705,7 @@ static int snd_es18xx_playback2_trigger(struct snd_es18xx *chip, | |||
705 | snd_es18xx_write(chip, 0xB8, 0x00); | 705 | snd_es18xx_write(chip, 0xB8, 0x00); |
706 | #ifdef AVOID_POPS | 706 | #ifdef AVOID_POPS |
707 | /* Avoid pops */ | 707 | /* Avoid pops */ |
708 | udelay(25000); | 708 | mdelay(25); |
709 | /* Disable Audio 1 */ | 709 | /* Disable Audio 1 */ |
710 | snd_es18xx_dsp_command(chip, 0xD3); | 710 | snd_es18xx_dsp_command(chip, 0xD3); |
711 | #endif | 711 | #endif |
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index 248b90abb882..480bbddbd801 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c | |||
@@ -1059,24 +1059,26 @@ static void azx_init_cmd_io(struct azx *chip) | |||
1059 | 1059 | ||
1060 | /* reset the corb hw read pointer */ | 1060 | /* reset the corb hw read pointer */ |
1061 | azx_writew(chip, CORBRP, ICH6_CORBRP_RST); | 1061 | azx_writew(chip, CORBRP, ICH6_CORBRP_RST); |
1062 | for (timeout = 1000; timeout > 0; timeout--) { | 1062 | if (!(chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR)) { |
1063 | if ((azx_readw(chip, CORBRP) & ICH6_CORBRP_RST) == ICH6_CORBRP_RST) | 1063 | for (timeout = 1000; timeout > 0; timeout--) { |
1064 | break; | 1064 | if ((azx_readw(chip, CORBRP) & ICH6_CORBRP_RST) == ICH6_CORBRP_RST) |
1065 | udelay(1); | 1065 | break; |
1066 | } | 1066 | udelay(1); |
1067 | if (timeout <= 0) | 1067 | } |
1068 | dev_err(chip->card->dev, "CORB reset timeout#1, CORBRP = %d\n", | 1068 | if (timeout <= 0) |
1069 | azx_readw(chip, CORBRP)); | 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 | azx_writew(chip, CORBRP, 0); |
1072 | for (timeout = 1000; timeout > 0; timeout--) { | 1073 | for (timeout = 1000; timeout > 0; timeout--) { |
1073 | if (azx_readw(chip, CORBRP) == 0) | 1074 | if (azx_readw(chip, CORBRP) == 0) |
1074 | break; | 1075 | break; |
1075 | udelay(1); | 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 | /* enable corb dma */ | 1083 | /* enable corb dma */ |
1082 | azx_writeb(chip, CORBCTL, ICH6_CORBCTL_RUN); | 1084 | azx_writeb(chip, CORBCTL, ICH6_CORBCTL_RUN); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index d6bca62ef387..b540ad71eb0d 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -249,7 +249,8 @@ enum { | |||
249 | /* quirks for Nvidia */ | 249 | /* quirks for Nvidia */ |
250 | #define AZX_DCAPS_PRESET_NVIDIA \ | 250 | #define AZX_DCAPS_PRESET_NVIDIA \ |
251 | (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI |\ | 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 | #define AZX_DCAPS_PRESET_CTHDA \ | 255 | #define AZX_DCAPS_PRESET_CTHDA \ |
255 | (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY) | 256 | (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY) |
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h index ba38b819f984..4a7cb01fa912 100644 --- a/sound/pci/hda/hda_priv.h +++ b/sound/pci/hda/hda_priv.h | |||
@@ -189,6 +189,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
189 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ | 189 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ |
190 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ | 190 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ |
191 | #define AZX_DCAPS_I915_POWERWELL (1 << 27) /* HSW i915 powerwell support */ | 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 | /* position fix mode */ | 194 | /* position fix mode */ |
194 | enum { | 195 | enum { |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 0cb5b89cd0c8..1edbb9c47c2d 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1127,8 +1127,10 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, | |||
1127 | AMP_OUT_UNMUTE); | 1127 | AMP_OUT_UNMUTE); |
1128 | 1128 | ||
1129 | eld = &per_pin->sink_eld; | 1129 | eld = &per_pin->sink_eld; |
1130 | if (!eld->monitor_present) | 1130 | if (!eld->monitor_present) { |
1131 | hdmi_set_channel_count(codec, per_pin->cvt_nid, channels); | ||
1131 | return; | 1132 | return; |
1133 | } | ||
1132 | 1134 | ||
1133 | if (!non_pcm && per_pin->chmap_set) | 1135 | if (!non_pcm && per_pin->chmap_set) |
1134 | ca = hdmi_manual_channel_allocation(channels, per_pin->chmap); | 1136 | ca = hdmi_manual_channel_allocation(channels, per_pin->chmap); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ec20b5eff7dc..b60de0dc40d3 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4710,6 +4710,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4710 | SND_PCI_QUIRK(0x1028, 0x0667, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4710 | SND_PCI_QUIRK(0x1028, 0x0667, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4711 | SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), | 4711 | SND_PCI_QUIRK(0x1028, 0x0668, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), |
4712 | SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), | 4712 | SND_PCI_QUIRK(0x1028, 0x0669, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE), |
4713 | SND_PCI_QUIRK(0x1028, 0x0674, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4714 | SND_PCI_QUIRK(0x1028, 0x067e, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4715 | SND_PCI_QUIRK(0x1028, 0x067f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4713 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4716 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4714 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4717 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4715 | SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), | 4718 | SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
@@ -5631,6 +5634,8 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { | |||
5631 | SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5634 | SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5632 | SND_PCI_QUIRK(0x1028, 0x0628, "Dell", ALC668_FIXUP_AUTO_MUTE), | 5635 | SND_PCI_QUIRK(0x1028, 0x0628, "Dell", ALC668_FIXUP_AUTO_MUTE), |
5633 | SND_PCI_QUIRK(0x1028, 0x064e, "Dell", ALC668_FIXUP_AUTO_MUTE), | 5636 | SND_PCI_QUIRK(0x1028, 0x064e, "Dell", ALC668_FIXUP_AUTO_MUTE), |
5637 | SND_PCI_QUIRK(0x1028, 0x0696, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
5638 | SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
5634 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), | 5639 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), |
5635 | SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A), | 5640 | SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A), |
5636 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), | 5641 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), |
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c index f500905e9373..2acf82f4a08a 100644 --- a/sound/soc/codecs/alc5623.c +++ b/sound/soc/codecs/alc5623.c | |||
@@ -1018,13 +1018,13 @@ static int alc5623_i2c_probe(struct i2c_client *client, | |||
1018 | dev_err(&client->dev, "failed to read vendor ID1: %d\n", ret); | 1018 | dev_err(&client->dev, "failed to read vendor ID1: %d\n", ret); |
1019 | return ret; | 1019 | return ret; |
1020 | } | 1020 | } |
1021 | vid1 = ((vid1 & 0xff) << 8) | (vid1 >> 8); | ||
1022 | 1021 | ||
1023 | ret = regmap_read(alc5623->regmap, ALC5623_VENDOR_ID2, &vid2); | 1022 | ret = regmap_read(alc5623->regmap, ALC5623_VENDOR_ID2, &vid2); |
1024 | if (ret < 0) { | 1023 | if (ret < 0) { |
1025 | dev_err(&client->dev, "failed to read vendor ID2: %d\n", ret); | 1024 | dev_err(&client->dev, "failed to read vendor ID2: %d\n", ret); |
1026 | return ret; | 1025 | return ret; |
1027 | } | 1026 | } |
1027 | vid2 >>= 8; | ||
1028 | 1028 | ||
1029 | if ((vid1 != 0x10ec) || (vid2 != id->driver_data)) { | 1029 | if ((vid1 != 0x10ec) || (vid2 != id->driver_data)) { |
1030 | dev_err(&client->dev, "unknown or wrong codec\n"); | 1030 | dev_err(&client->dev, "unknown or wrong codec\n"); |
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 460d35547a68..2213a037c893 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
@@ -1229,8 +1229,10 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client, | |||
1229 | } | 1229 | } |
1230 | 1230 | ||
1231 | if (cs42l52->pdata.reset_gpio) { | 1231 | if (cs42l52->pdata.reset_gpio) { |
1232 | ret = gpio_request_one(cs42l52->pdata.reset_gpio, | 1232 | ret = devm_gpio_request_one(&i2c_client->dev, |
1233 | GPIOF_OUT_INIT_HIGH, "CS42L52 /RST"); | 1233 | cs42l52->pdata.reset_gpio, |
1234 | GPIOF_OUT_INIT_HIGH, | ||
1235 | "CS42L52 /RST"); | ||
1234 | if (ret < 0) { | 1236 | if (ret < 0) { |
1235 | dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", | 1237 | dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", |
1236 | cs42l52->pdata.reset_gpio, ret); | 1238 | cs42l52->pdata.reset_gpio, ret); |
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 0ee60a19a263..ae3717992d56 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c | |||
@@ -1443,8 +1443,10 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client, | |||
1443 | i2c_set_clientdata(i2c_client, cs42l73); | 1443 | i2c_set_clientdata(i2c_client, cs42l73); |
1444 | 1444 | ||
1445 | if (cs42l73->pdata.reset_gpio) { | 1445 | if (cs42l73->pdata.reset_gpio) { |
1446 | ret = gpio_request_one(cs42l73->pdata.reset_gpio, | 1446 | ret = devm_gpio_request_one(&i2c_client->dev, |
1447 | GPIOF_OUT_INIT_HIGH, "CS42L73 /RST"); | 1447 | cs42l73->pdata.reset_gpio, |
1448 | GPIOF_OUT_INIT_HIGH, | ||
1449 | "CS42L73 /RST"); | ||
1448 | if (ret < 0) { | 1450 | if (ret < 0) { |
1449 | dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", | 1451 | dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", |
1450 | cs42l73->pdata.reset_gpio, ret); | 1452 | cs42l73->pdata.reset_gpio, ret); |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b1835103e9b4..d7349bc89ad3 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1399,7 +1399,6 @@ static int aic3x_probe(struct snd_soc_codec *codec) | |||
1399 | } | 1399 | } |
1400 | 1400 | ||
1401 | aic3x_add_widgets(codec); | 1401 | aic3x_add_widgets(codec); |
1402 | list_add(&aic3x->list, &reset_list); | ||
1403 | 1402 | ||
1404 | return 0; | 1403 | return 0; |
1405 | 1404 | ||
@@ -1569,7 +1568,13 @@ static int aic3x_i2c_probe(struct i2c_client *i2c, | |||
1569 | 1568 | ||
1570 | ret = snd_soc_register_codec(&i2c->dev, | 1569 | ret = snd_soc_register_codec(&i2c->dev, |
1571 | &soc_codec_dev_aic3x, &aic3x_dai, 1); | 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 | err_gpio: | 1579 | err_gpio: |
1575 | if (gpio_is_valid(aic3x->gpio_reset) && | 1580 | if (gpio_is_valid(aic3x->gpio_reset) && |
diff --git a/sound/soc/fsl/fsl_spdif.h b/sound/soc/fsl/fsl_spdif.h index b1266790d117..605a10b2112b 100644 --- a/sound/soc/fsl/fsl_spdif.h +++ b/sound/soc/fsl/fsl_spdif.h | |||
@@ -144,8 +144,8 @@ enum spdif_gainsel { | |||
144 | 144 | ||
145 | /* SPDIF Clock register */ | 145 | /* SPDIF Clock register */ |
146 | #define STC_SYSCLK_DIV_OFFSET 11 | 146 | #define STC_SYSCLK_DIV_OFFSET 11 |
147 | #define STC_SYSCLK_DIV_MASK (0x1ff << STC_TXCLK_SRC_OFFSET) | 147 | #define STC_SYSCLK_DIV_MASK (0x1ff << STC_SYSCLK_DIV_OFFSET) |
148 | #define STC_SYSCLK_DIV(x) ((((x) - 1) << STC_TXCLK_DIV_OFFSET) & STC_SYSCLK_DIV_MASK) | 148 | #define STC_SYSCLK_DIV(x) ((((x) - 1) << STC_SYSCLK_DIV_OFFSET) & STC_SYSCLK_DIV_MASK) |
149 | #define STC_TXCLK_SRC_OFFSET 8 | 149 | #define STC_TXCLK_SRC_OFFSET 8 |
150 | #define STC_TXCLK_SRC_MASK (0x7 << STC_TXCLK_SRC_OFFSET) | 150 | #define STC_TXCLK_SRC_MASK (0x7 << STC_TXCLK_SRC_OFFSET) |
151 | #define STC_TXCLK_SRC_SET(x) ((x << STC_TXCLK_SRC_OFFSET) & STC_TXCLK_SRC_MASK) | 151 | #define STC_TXCLK_SRC_SET(x) ((x << STC_TXCLK_SRC_OFFSET) & STC_TXCLK_SRC_MASK) |
diff --git a/sound/soc/intel/sst-dsp-priv.h b/sound/soc/intel/sst-dsp-priv.h index fe8e81aad646..30ca14a6a835 100644 --- a/sound/soc/intel/sst-dsp-priv.h +++ b/sound/soc/intel/sst-dsp-priv.h | |||
@@ -136,7 +136,7 @@ struct sst_module_data { | |||
136 | enum sst_data_type data_type; /* type of module data */ | 136 | enum sst_data_type data_type; /* type of module data */ |
137 | 137 | ||
138 | u32 size; /* size in bytes */ | 138 | u32 size; /* size in bytes */ |
139 | u32 offset; /* offset in FW file */ | 139 | int32_t offset; /* offset in FW file */ |
140 | u32 data_offset; /* offset in ADSP memory space */ | 140 | u32 data_offset; /* offset in ADSP memory space */ |
141 | void *data; /* module data */ | 141 | void *data; /* module data */ |
142 | }; | 142 | }; |
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index f46bb4ddde6f..50e4246d4b57 100644 --- a/sound/soc/intel/sst-haswell-ipc.c +++ b/sound/soc/intel/sst-haswell-ipc.c | |||
@@ -617,7 +617,7 @@ static void hsw_notification_work(struct work_struct *work) | |||
617 | case IPC_POSITION_CHANGED: | 617 | case IPC_POSITION_CHANGED: |
618 | trace_ipc_notification("DSP stream position changed for", | 618 | trace_ipc_notification("DSP stream position changed for", |
619 | stream->reply.stream_hw_id); | 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 | if (stream->notify_position) | 622 | if (stream->notify_position) |
623 | stream->notify_position(stream, stream->pdata); | 623 | 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 | |||
991 | return -EINVAL; | 991 | return -EINVAL; |
992 | 992 | ||
993 | sst_dsp_read(hsw->dsp, volume, | 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 | return 0; | 997 | return 0; |
997 | } | 998 | } |
@@ -1609,7 +1610,7 @@ int sst_hsw_dx_set_state(struct sst_hsw *hsw, | |||
1609 | trace_ipc_request("PM enter Dx state", state); | 1610 | trace_ipc_request("PM enter Dx state", state); |
1610 | 1611 | ||
1611 | ret = ipc_tx_message_wait(hsw, header, &state_, sizeof(state_), | 1612 | ret = ipc_tx_message_wait(hsw, header, &state_, sizeof(state_), |
1612 | dx, sizeof(dx)); | 1613 | dx, sizeof(*dx)); |
1613 | if (ret < 0) { | 1614 | if (ret < 0) { |
1614 | dev_err(hsw->dev, "ipc: error set dx state %d failed\n", state); | 1615 | dev_err(hsw->dev, "ipc: error set dx state %d failed\n", state); |
1615 | return ret; | 1616 | return ret; |
diff --git a/sound/soc/jz4740/Makefile b/sound/soc/jz4740/Makefile index be873c1b0c20..d32c540555c4 100644 --- a/sound/soc/jz4740/Makefile +++ b/sound/soc/jz4740/Makefile | |||
@@ -1,10 +1,8 @@ | |||
1 | # | 1 | # |
2 | # Jz4740 Platform Support | 2 | # Jz4740 Platform Support |
3 | # | 3 | # |
4 | snd-soc-jz4740-objs := jz4740-pcm.o | ||
5 | snd-soc-jz4740-i2s-objs := jz4740-i2s.o | 4 | snd-soc-jz4740-i2s-objs := jz4740-i2s.o |
6 | 5 | ||
7 | obj-$(CONFIG_SND_JZ4740_SOC) += snd-soc-jz4740.o | ||
8 | obj-$(CONFIG_SND_JZ4740_SOC_I2S) += snd-soc-jz4740-i2s.o | 6 | obj-$(CONFIG_SND_JZ4740_SOC_I2S) += snd-soc-jz4740-i2s.o |
9 | 7 | ||
10 | # Jz4740 Machine Support | 8 | # Jz4740 Machine Support |
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 6232b7d307aa..4d0720ed5a90 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c | |||
@@ -258,7 +258,7 @@ static int rsnd_src_init(struct rsnd_mod *mod, | |||
258 | { | 258 | { |
259 | struct rsnd_src *src = rsnd_mod_to_src(mod); | 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 | return 0; | 263 | return 0; |
264 | } | 264 | } |
@@ -269,7 +269,7 @@ static int rsnd_src_quit(struct rsnd_mod *mod, | |||
269 | { | 269 | { |
270 | struct rsnd_src *src = rsnd_mod_to_src(mod); | 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 | return 0; | 274 | return 0; |
275 | } | 275 | } |
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 4b7e20603dd7..1d8387c25bd8 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c | |||
@@ -171,7 +171,7 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi, | |||
171 | u32 cr; | 171 | u32 cr; |
172 | 172 | ||
173 | if (0 == ssi->usrcnt) { | 173 | if (0 == ssi->usrcnt) { |
174 | clk_enable(ssi->clk); | 174 | clk_prepare_enable(ssi->clk); |
175 | 175 | ||
176 | if (rsnd_dai_is_clk_master(rdai)) { | 176 | if (rsnd_dai_is_clk_master(rdai)) { |
177 | if (rsnd_ssi_clk_from_parent(ssi)) | 177 | if (rsnd_ssi_clk_from_parent(ssi)) |
@@ -230,7 +230,7 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi, | |||
230 | rsnd_ssi_master_clk_stop(ssi); | 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 | dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod)); | 236 | dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod)); |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index c8a780d0d057..7769b0a2bc5a 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -254,7 +254,6 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget, | |||
254 | static void dapm_kcontrol_free(struct snd_kcontrol *kctl) | 254 | static void dapm_kcontrol_free(struct snd_kcontrol *kctl) |
255 | { | 255 | { |
256 | struct dapm_kcontrol_data *data = snd_kcontrol_chip(kctl); | 256 | struct dapm_kcontrol_data *data = snd_kcontrol_chip(kctl); |
257 | kfree(data->widget); | ||
258 | kfree(data->wlist); | 257 | kfree(data->wlist); |
259 | kfree(data); | 258 | kfree(data); |
260 | } | 259 | } |
diff --git a/sound/usb/card.c b/sound/usb/card.c index 893d5a1afc3c..c3b5b7dca1c3 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
@@ -651,7 +651,7 @@ int snd_usb_autoresume(struct snd_usb_audio *chip) | |||
651 | int err = -ENODEV; | 651 | int err = -ENODEV; |
652 | 652 | ||
653 | down_read(&chip->shutdown_rwsem); | 653 | down_read(&chip->shutdown_rwsem); |
654 | if (chip->probing) | 654 | if (chip->probing && chip->in_pm) |
655 | err = 0; | 655 | err = 0; |
656 | else if (!chip->shutdown) | 656 | else if (!chip->shutdown) |
657 | err = usb_autopm_get_interface(chip->pm_intf); | 657 | err = usb_autopm_get_interface(chip->pm_intf); |
@@ -663,7 +663,7 @@ int snd_usb_autoresume(struct snd_usb_audio *chip) | |||
663 | void snd_usb_autosuspend(struct snd_usb_audio *chip) | 663 | void snd_usb_autosuspend(struct snd_usb_audio *chip) |
664 | { | 664 | { |
665 | down_read(&chip->shutdown_rwsem); | 665 | down_read(&chip->shutdown_rwsem); |
666 | if (!chip->shutdown && !chip->probing) | 666 | if (!chip->shutdown && !chip->probing && !chip->in_pm) |
667 | usb_autopm_put_interface(chip->pm_intf); | 667 | usb_autopm_put_interface(chip->pm_intf); |
668 | up_read(&chip->shutdown_rwsem); | 668 | up_read(&chip->shutdown_rwsem); |
669 | } | 669 | } |
@@ -695,8 +695,9 @@ static int usb_audio_suspend(struct usb_interface *intf, pm_message_t message) | |||
695 | chip->autosuspended = 1; | 695 | chip->autosuspended = 1; |
696 | } | 696 | } |
697 | 697 | ||
698 | list_for_each_entry(mixer, &chip->mixer_list, list) | 698 | if (chip->num_suspended_intf == 1) |
699 | snd_usb_mixer_suspend(mixer); | 699 | list_for_each_entry(mixer, &chip->mixer_list, list) |
700 | snd_usb_mixer_suspend(mixer); | ||
700 | 701 | ||
701 | return 0; | 702 | return 0; |
702 | } | 703 | } |
@@ -711,6 +712,8 @@ static int __usb_audio_resume(struct usb_interface *intf, bool reset_resume) | |||
711 | return 0; | 712 | return 0; |
712 | if (--chip->num_suspended_intf) | 713 | if (--chip->num_suspended_intf) |
713 | return 0; | 714 | return 0; |
715 | |||
716 | chip->in_pm = 1; | ||
714 | /* | 717 | /* |
715 | * ALSA leaves material resumption to user space | 718 | * ALSA leaves material resumption to user space |
716 | * we just notify and restart the mixers | 719 | * we just notify and restart the mixers |
@@ -726,6 +729,7 @@ static int __usb_audio_resume(struct usb_interface *intf, bool reset_resume) | |||
726 | chip->autosuspended = 0; | 729 | chip->autosuspended = 0; |
727 | 730 | ||
728 | err_out: | 731 | err_out: |
732 | chip->in_pm = 0; | ||
729 | return err; | 733 | return err; |
730 | } | 734 | } |
731 | 735 | ||
diff --git a/sound/usb/card.h b/sound/usb/card.h index 9867ab866857..97acb906acc2 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h | |||
@@ -92,6 +92,7 @@ struct snd_usb_endpoint { | |||
92 | unsigned int curframesize; /* current packet size in frames (for capture) */ | 92 | unsigned int curframesize; /* current packet size in frames (for capture) */ |
93 | unsigned int syncmaxsize; /* sync endpoint packet size */ | 93 | unsigned int syncmaxsize; /* sync endpoint packet size */ |
94 | unsigned int fill_max:1; /* fill max packet size always */ | 94 | unsigned int fill_max:1; /* fill max packet size always */ |
95 | unsigned int udh01_fb_quirk:1; /* corrupted feedback data */ | ||
95 | unsigned int datainterval; /* log_2 of data packet interval */ | 96 | unsigned int datainterval; /* log_2 of data packet interval */ |
96 | unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */ | 97 | unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */ |
97 | unsigned char silence_value; | 98 | unsigned char silence_value; |
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index e70a87e0d9fe..289f582c9130 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c | |||
@@ -471,6 +471,10 @@ struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip, | |||
471 | ep->syncinterval = 3; | 471 | ep->syncinterval = 3; |
472 | 472 | ||
473 | ep->syncmaxsize = le16_to_cpu(get_endpoint(alts, 1)->wMaxPacketSize); | 473 | ep->syncmaxsize = le16_to_cpu(get_endpoint(alts, 1)->wMaxPacketSize); |
474 | |||
475 | if (chip->usb_id == USB_ID(0x0644, 0x8038) /* TEAC UD-H01 */ && | ||
476 | ep->syncmaxsize == 4) | ||
477 | ep->udh01_fb_quirk = 1; | ||
474 | } | 478 | } |
475 | 479 | ||
476 | list_add_tail(&ep->list, &chip->ep_list); | 480 | list_add_tail(&ep->list, &chip->ep_list); |
@@ -1105,7 +1109,16 @@ void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep, | |||
1105 | if (f == 0) | 1109 | if (f == 0) |
1106 | return; | 1110 | return; |
1107 | 1111 | ||
1108 | if (unlikely(ep->freqshift == INT_MIN)) { | 1112 | if (unlikely(sender->udh01_fb_quirk)) { |
1113 | /* | ||
1114 | * The TEAC UD-H01 firmware sometimes changes the feedback value | ||
1115 | * by +/- 0x1.0000. | ||
1116 | */ | ||
1117 | if (f < ep->freqn - 0x8000) | ||
1118 | f += 0x10000; | ||
1119 | else if (f > ep->freqn + 0x8000) | ||
1120 | f -= 0x10000; | ||
1121 | } else if (unlikely(ep->freqshift == INT_MIN)) { | ||
1109 | /* | 1122 | /* |
1110 | * The first time we see a feedback value, determine its format | 1123 | * The first time we see a feedback value, determine its format |
1111 | * by shifting it left or right until it matches the nominal | 1124 | * by shifting it left or right until it matches the nominal |
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 131336d40492..c62a1659106d 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -1501,9 +1501,8 @@ static void retire_playback_urb(struct snd_usb_substream *subs, | |||
1501 | * The error should be lower than 2ms since the estimate relies | 1501 | * The error should be lower than 2ms since the estimate relies |
1502 | * on two reads of a counter updated every ms. | 1502 | * on two reads of a counter updated every ms. |
1503 | */ | 1503 | */ |
1504 | if (printk_ratelimit() && | 1504 | if (abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2) |
1505 | abs(est_delay - subs->last_delay) * 1000 > runtime->rate * 2) | 1505 | dev_dbg_ratelimited(&subs->dev->dev, |
1506 | dev_dbg(&subs->dev->dev, | ||
1507 | "delay: estimated %d, actual %d\n", | 1506 | "delay: estimated %d, actual %d\n", |
1508 | est_delay, subs->last_delay); | 1507 | est_delay, subs->last_delay); |
1509 | 1508 | ||
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 25c4c7e217de..91d0380431b4 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h | |||
@@ -40,6 +40,7 @@ struct snd_usb_audio { | |||
40 | struct rw_semaphore shutdown_rwsem; | 40 | struct rw_semaphore shutdown_rwsem; |
41 | unsigned int shutdown:1; | 41 | unsigned int shutdown:1; |
42 | unsigned int probing:1; | 42 | unsigned int probing:1; |
43 | unsigned int in_pm:1; | ||
43 | unsigned int autosuspended:1; | 44 | unsigned int autosuspended:1; |
44 | unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ | 45 | unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ |
45 | 46 | ||