History

Merge remote-tracking branches 'asoc/fix/amd', 'asoc/fix/hdmi-codec', 'asoc/fix/rt5651', 'asoc/fix/samsung', 'asoc/fix/sgtl5000', 'asoc/fix/sunxi' and 'asoc/fix/wm-adsp' into asoc-linus

Mark Brown committed 8 years ago

Commit a3e39ed8 parents 0c8efd6 a37d48e 5e558f8 2d30e94 dbe7d4c a899297 5a33867 d7789f58 files · +53 −23Browse files

Unified · Split

8 files
  1. MAINTAINERS +8 −0
  2. sound/soc/amd/acp-pcm-dma.c +9 −7
  3. sound/soc/amd/acp.h +2 −0
  4. sound/soc/codecs/hdmi-codec.c +1 −6
  5. sound/soc/codecs/rt5651.c +1 −0
  6. sound/soc/codecs/sgtl5000.c +23 −3
  7. sound/soc/codecs/wm_adsp.c +8 −6
  8. sound/soc/sunxi/sun4i-i2s.c +1 −1
MAINTAINERS+8−0
@@ -9925,6 +9925,13 @@ F: Documentation/ABI/stable/sysfs-bus-nvmem · 9924 unmodified lines
99259925 F: include/linux/nvmem-consumer.h
99269926 F: include/linux/nvmem-provider.h
99279927
9928+NXP SGTL5000 DRIVER
9929+M: Fabio Estevam <fabio.estevam@nxp.com>
9930+L: alsa-devel@alsa-project.org (moderated for non-subscribers)
9931+S: Maintained
9932+F: Documentation/devicetree/bindings/sound/sgtl5000.txt
9933+F: sound/soc/codecs/sgtl5000*
9934+
99289935 NXP TDA998X DRM DRIVER
99299936 M: Russell King <linux@armlinux.org.uk>
99309937 S: Supported
@@ -12107,6 +12114,7 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com> · 2176 unmodified lines
1210712114 L: alsa-devel@alsa-project.org (moderated for non-subscribers)
1210812115 S: Supported
1210912116 F: sound/soc/samsung/
12117+F: Documentation/devicetree/bindings/sound/samsung*
1211012118
1211112119 SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER
1211212120 M: Krzysztof Kozlowski <krzk@kernel.org>
sound/soc/amd/acp-pcm-dma.c+9−7
@@ -579,13 +579,6 @@ static int acp_init(void __iomem *acp_mmio, u32 asic_type) · 578 unmodified lines
579579 for (bank = 1; bank < 48; bank++)
580580 acp_set_sram_bank_state(acp_mmio, bank, false);
581581 }
582−
583− /* Stoney supports 16bit resolution */
584− if (asic_type == CHIP_STONEY) {
585− val = acp_reg_read(acp_mmio, mmACP_I2S_16BIT_RESOLUTION_EN);
586− val |= 0x03;
587− acp_reg_write(val, acp_mmio, mmACP_I2S_16BIT_RESOLUTION_EN);
588− }
589582 return 0;
590583 }
591584
@@ -774,6 +767,7 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, · 182 unmodified lines
774767 {
775768 int status;
776769 uint64_t size;
770+ u32 val = 0;
777771 struct page *pg;
778772 struct snd_pcm_runtime *runtime;
779773 struct audio_substream_data *rtd;
@@ -786,6 +780,14 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, · 6 unmodified lines
786780 if (WARN_ON(!rtd))
787781 return -EINVAL;
788782
783+ if (adata->asic_type == CHIP_STONEY) {
784+ val = acp_reg_read(adata->acp_mmio, mmACP_I2S_16BIT_RESOLUTION_EN);
785+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
786+ val |= ACP_I2S_SP_16BIT_RESOLUTION_EN;
787+ else
788+ val |= ACP_I2S_MIC_16BIT_RESOLUTION_EN;
789+ acp_reg_write(val, adata->acp_mmio, mmACP_I2S_16BIT_RESOLUTION_EN);
790+ }
789791 size = params_buffer_bytes(params);
790792 status = snd_pcm_lib_malloc_pages(substream, size);
791793 if (status < 0)
sound/soc/amd/acp.h+2−0
@@ -70,6 +70,8 @@ · 69 unmodified lines
7070 #define CAPTURE_END_DMA_DESCR_CH15 7
7171
7272 #define mmACP_I2S_16BIT_RESOLUTION_EN 0x5209
73+#define ACP_I2S_MIC_16BIT_RESOLUTION_EN 0x01
74+#define ACP_I2S_SP_16BIT_RESOLUTION_EN 0x02
7375 enum acp_dma_priority_level {
7476 /* 0x0 Specifies the DMA channel is given normal priority */
7577 ACP_DMA_PRIORITY_LEVEL_NORMAL = 0x0,
sound/soc/codecs/hdmi-codec.c+1−6
@@ -798,12 +798,7 @@ static int hdmi_codec_probe(struct platform_device *pdev) · 797 unmodified lines
798798
799799 static int hdmi_codec_remove(struct platform_device *pdev)
800800 {
801− struct device *dev = &pdev->dev;
802− struct hdmi_codec_priv *hcp;
803−
804− hcp = dev_get_drvdata(dev);
805− kfree(hcp->chmap_info);
806− snd_soc_unregister_codec(dev);
801+ snd_soc_unregister_codec(&pdev->dev);
807802
808803 return 0;
809804 }
sound/soc/codecs/rt5651.c+1−0
@@ -1722,6 +1722,7 @@ static const struct regmap_config rt5651_regmap = { · 1721 unmodified lines
17221722 .num_reg_defaults = ARRAY_SIZE(rt5651_reg),
17231723 .ranges = rt5651_ranges,
17241724 .num_ranges = ARRAY_SIZE(rt5651_ranges),
1725+ .use_single_rw = true,
17251726 };
17261727
17271728 #if defined(CONFIG_OF)
sound/soc/codecs/sgtl5000.c+23−3
@@ -529,10 +529,15 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { · 528 unmodified lines
529529 static int sgtl5000_digital_mute(struct snd_soc_dai *codec_dai, int mute)
530530 {
531531 struct snd_soc_codec *codec = codec_dai->codec;
532− u16 adcdac_ctrl = SGTL5000_DAC_MUTE_LEFT | SGTL5000_DAC_MUTE_RIGHT;
532+ u16 i2s_pwr = SGTL5000_I2S_IN_POWERUP;
533533
534− snd_soc_update_bits(codec, SGTL5000_CHIP_ADCDAC_CTRL,
535− adcdac_ctrl, mute ? adcdac_ctrl : 0);
534+ /*
535+ * During 'digital mute' do not mute DAC
536+ * because LINE_IN would be muted aswell. We want to mute
537+ * only I2S block - this can be done by powering it off
538+ */
539+ snd_soc_update_bits(codec, SGTL5000_CHIP_DIG_POWER,
540+ i2s_pwr, mute ? 0 : i2s_pwr);
536541
537542 return 0;
538543 }
@@ -871,15 +876,26 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream, · 332 unmodified lines
871876 static int sgtl5000_set_bias_level(struct snd_soc_codec *codec,
872877 enum snd_soc_bias_level level)
873878 {
879+ struct sgtl5000_priv *sgtl = snd_soc_codec_get_drvdata(codec);
880+ int ret;
881+
874882 switch (level) {
875883 case SND_SOC_BIAS_ON:
876884 case SND_SOC_BIAS_PREPARE:
877885 case SND_SOC_BIAS_STANDBY:
886+ regcache_cache_only(sgtl->regmap, false);
887+ ret = regcache_sync(sgtl->regmap);
888+ if (ret) {
889+ regcache_cache_only(sgtl->regmap, true);
890+ return ret;
891+ }
892+
878893 snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
879894 SGTL5000_REFTOP_POWERUP,
880895 SGTL5000_REFTOP_POWERUP);
881896 break;
882897 case SND_SOC_BIAS_OFF:
898+ regcache_cache_only(sgtl->regmap, true);
883899 snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
884900 SGTL5000_REFTOP_POWERUP, 0);
885901 break;
@@ -1237,6 +1253,10 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) · 351 unmodified lines
12371253 */
12381254 snd_soc_write(codec, SGTL5000_DAP_CTRL, 0);
12391255
1256+ /* Unmute DAC after start */
1257+ snd_soc_update_bits(codec, SGTL5000_CHIP_ADCDAC_CTRL,
1258+ SGTL5000_DAC_MUTE_LEFT | SGTL5000_DAC_MUTE_RIGHT, 0);
1259+
12401260 return 0;
12411261
12421262 err:
sound/soc/codecs/wm_adsp.c+8−6
@@ -1204,12 +1204,14 @@ static int wmfw_add_ctl(struct wm_adsp *dsp, struct wm_coeff_ctl *ctl) · 1203 unmodified lines
12041204 kcontrol->put = wm_coeff_put_acked;
12051205 break;
12061206 default:
1207− kcontrol->get = wm_coeff_get;
1208− kcontrol->put = wm_coeff_put;
1209−
1210− ctl->bytes_ext.max = ctl->len;
1211− ctl->bytes_ext.get = wm_coeff_tlv_get;
1212− ctl->bytes_ext.put = wm_coeff_tlv_put;
1207+ if (kcontrol->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) {
1208+ ctl->bytes_ext.max = ctl->len;
1209+ ctl->bytes_ext.get = wm_coeff_tlv_get;
1210+ ctl->bytes_ext.put = wm_coeff_tlv_put;
1211+ } else {
1212+ kcontrol->get = wm_coeff_get;
1213+ kcontrol->put = wm_coeff_put;
1214+ }
12131215 break;
12141216 }
12151217
sound/soc/sunxi/sun4i-i2s.c+1−1
@@ -104,7 +104,7 @@ · 103 unmodified lines
104104
105105 #define SUN8I_I2S_CHAN_CFG_REG 0x30
106106 #define SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM_MASK GENMASK(6, 4)
107−#define SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM(chan) (chan - 1)
107+#define SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM(chan) ((chan - 1) << 4)
108108 #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM_MASK GENMASK(2, 0)
109109 #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM(chan) (chan - 1)
110110

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t