a3e39ed8 parents 0c8efd6 a37d48e 5e558f8 2d30e94 dbe7d4c a899297 5a33867 d7789f58 files · +53 −23Browse filesUnified · Split
| @@ -9925,6 +9925,13 @@ F: Documentation/ABI/stable/sysfs-bus-nvmem · 9924 unmodified lines | ||
| 9925 | 9925 | F: include/linux/nvmem-consumer.h |
| 9926 | 9926 | F: include/linux/nvmem-provider.h |
| 9927 | 9927 | |
| 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 | + | |
| 9928 | 9935 | NXP TDA998X DRM DRIVER |
| 9929 | 9936 | M: Russell King <linux@armlinux.org.uk> |
| 9930 | 9937 | S: Supported |
| @@ -12107,6 +12114,7 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com> · 2176 unmodified lines | ||
| 12107 | 12114 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
| 12108 | 12115 | S: Supported |
| 12109 | 12116 | F: sound/soc/samsung/ |
| 12117 | +F: Documentation/devicetree/bindings/sound/samsung* | |
| 12110 | 12118 | |
| 12111 | 12119 | SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER |
| 12112 | 12120 | M: Krzysztof Kozlowski <krzk@kernel.org> |
| @@ -579,13 +579,6 @@ static int acp_init(void __iomem *acp_mmio, u32 asic_type) · 578 unmodified lines | ||
| 579 | 579 | for (bank = 1; bank < 48; bank++) |
| 580 | 580 | acp_set_sram_bank_state(acp_mmio, bank, false); |
| 581 | 581 | } |
| 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 | − } | |
| 589 | 582 | return 0; |
| 590 | 583 | } |
| 591 | 584 | |
| @@ -774,6 +767,7 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, · 182 unmodified lines | ||
| 774 | 767 | { |
| 775 | 768 | int status; |
| 776 | 769 | uint64_t size; |
| 770 | + u32 val = 0; | |
| 777 | 771 | struct page *pg; |
| 778 | 772 | struct snd_pcm_runtime *runtime; |
| 779 | 773 | struct audio_substream_data *rtd; |
| @@ -786,6 +780,14 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, · 6 unmodified lines | ||
| 786 | 780 | if (WARN_ON(!rtd)) |
| 787 | 781 | return -EINVAL; |
| 788 | 782 | |
| 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 | + } | |
| 789 | 791 | size = params_buffer_bytes(params); |
| 790 | 792 | status = snd_pcm_lib_malloc_pages(substream, size); |
| 791 | 793 | if (status < 0) |
| @@ -70,6 +70,8 @@ · 69 unmodified lines | ||
| 70 | 70 | #define CAPTURE_END_DMA_DESCR_CH15 7 |
| 71 | 71 | |
| 72 | 72 | #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 | |
| 73 | 75 | enum acp_dma_priority_level { |
| 74 | 76 | /* 0x0 Specifies the DMA channel is given normal priority */ |
| 75 | 77 | ACP_DMA_PRIORITY_LEVEL_NORMAL = 0x0, |
| @@ -798,12 +798,7 @@ static int hdmi_codec_probe(struct platform_device *pdev) · 797 unmodified lines | ||
| 798 | 798 | |
| 799 | 799 | static int hdmi_codec_remove(struct platform_device *pdev) |
| 800 | 800 | { |
| 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); | |
| 807 | 802 | |
| 808 | 803 | return 0; |
| 809 | 804 | } |
| @@ -1722,6 +1722,7 @@ static const struct regmap_config rt5651_regmap = { · 1721 unmodified lines | ||
| 1722 | 1722 | .num_reg_defaults = ARRAY_SIZE(rt5651_reg), |
| 1723 | 1723 | .ranges = rt5651_ranges, |
| 1724 | 1724 | .num_ranges = ARRAY_SIZE(rt5651_ranges), |
| 1725 | + .use_single_rw = true, | |
| 1725 | 1726 | }; |
| 1726 | 1727 | |
| 1727 | 1728 | #if defined(CONFIG_OF) |
| @@ -529,10 +529,15 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { · 528 unmodified lines | ||
| 529 | 529 | static int sgtl5000_digital_mute(struct snd_soc_dai *codec_dai, int mute) |
| 530 | 530 | { |
| 531 | 531 | 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; | |
| 533 | 533 | |
| 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); | |
| 536 | 541 | |
| 537 | 542 | return 0; |
| 538 | 543 | } |
| @@ -871,15 +876,26 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream, · 332 unmodified lines | ||
| 871 | 876 | static int sgtl5000_set_bias_level(struct snd_soc_codec *codec, |
| 872 | 877 | enum snd_soc_bias_level level) |
| 873 | 878 | { |
| 879 | + struct sgtl5000_priv *sgtl = snd_soc_codec_get_drvdata(codec); | |
| 880 | + int ret; | |
| 881 | + | |
| 874 | 882 | switch (level) { |
| 875 | 883 | case SND_SOC_BIAS_ON: |
| 876 | 884 | case SND_SOC_BIAS_PREPARE: |
| 877 | 885 | 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 | + | |
| 878 | 893 | snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, |
| 879 | 894 | SGTL5000_REFTOP_POWERUP, |
| 880 | 895 | SGTL5000_REFTOP_POWERUP); |
| 881 | 896 | break; |
| 882 | 897 | case SND_SOC_BIAS_OFF: |
| 898 | + regcache_cache_only(sgtl->regmap, true); | |
| 883 | 899 | snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, |
| 884 | 900 | SGTL5000_REFTOP_POWERUP, 0); |
| 885 | 901 | break; |
| @@ -1237,6 +1253,10 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) · 351 unmodified lines | ||
| 1237 | 1253 | */ |
| 1238 | 1254 | snd_soc_write(codec, SGTL5000_DAP_CTRL, 0); |
| 1239 | 1255 | |
| 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 | + | |
| 1240 | 1260 | return 0; |
| 1241 | 1261 | |
| 1242 | 1262 | err: |
| @@ -1204,12 +1204,14 @@ static int wmfw_add_ctl(struct wm_adsp *dsp, struct wm_coeff_ctl *ctl) · 1203 unmodified lines | ||
| 1204 | 1204 | kcontrol->put = wm_coeff_put_acked; |
| 1205 | 1205 | break; |
| 1206 | 1206 | 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 | + } | |
| 1213 | 1215 | break; |
| 1214 | 1216 | } |
| 1215 | 1217 | |
| @@ -104,7 +104,7 @@ · 103 unmodified lines | ||
| 104 | 104 | |
| 105 | 105 | #define SUN8I_I2S_CHAN_CFG_REG 0x30 |
| 106 | 106 | #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) | |
| 108 | 108 | #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM_MASK GENMASK(2, 0) |
| 109 | 109 | #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM(chan) (chan - 1) |
| 110 | 110 | |