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 | F: include/linux/nvmem-consumer.h | 9925 | F: include/linux/nvmem-consumer.h |
| 9926 | F: include/linux/nvmem-provider.h | 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 | NXP TDA998X DRM DRIVER | 9935 | NXP TDA998X DRM DRIVER |
| 9929 | M: Russell King <linux@armlinux.org.uk> | 9936 | M: Russell King <linux@armlinux.org.uk> |
| 9930 | S: Supported | 9937 | S: Supported |
| @@ -12107,6 +12114,7 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com> · 2176 unmodified lines | |||
| 12107 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | 12114 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
| 12108 | S: Supported | 12115 | S: Supported |
| 12109 | F: sound/soc/samsung/ | 12116 | F: sound/soc/samsung/ |
| 12117 | F: Documentation/devicetree/bindings/sound/samsung* | ||
| 12110 | 12118 | ||
| 12111 | SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER | 12119 | SAMSUNG EXYNOS PSEUDO RANDOM NUMBER GENERATOR (RNG) DRIVER |
| 12112 | M: Krzysztof Kozlowski <krzk@kernel.org> | 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 | for (bank = 1; bank < 48; bank++) | 579 | for (bank = 1; bank < 48; bank++) |
| 580 | acp_set_sram_bank_state(acp_mmio, bank, false); | 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 | return 0; | 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 | int status; | 768 | int status; |
| 776 | uint64_t size; | 769 | uint64_t size; |
| 770 | u32 val = 0; | ||
| 777 | struct page *pg; | 771 | struct page *pg; |
| 778 | struct snd_pcm_runtime *runtime; | 772 | struct snd_pcm_runtime *runtime; |
| 779 | struct audio_substream_data *rtd; | 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 | if (WARN_ON(!rtd)) | 780 | if (WARN_ON(!rtd)) |
| 787 | return -EINVAL; | 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 | size = params_buffer_bytes(params); | 791 | size = params_buffer_bytes(params); |
| 790 | status = snd_pcm_lib_malloc_pages(substream, size); | 792 | status = snd_pcm_lib_malloc_pages(substream, size); |
| 791 | if (status < 0) | 793 | if (status < 0) |
| @@ -70,6 +70,8 @@ · 69 unmodified lines | |||
| 70 | #define CAPTURE_END_DMA_DESCR_CH15 7 | 70 | #define CAPTURE_END_DMA_DESCR_CH15 7 |
| 71 | 71 | ||
| 72 | #define mmACP_I2S_16BIT_RESOLUTION_EN 0x5209 | 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 | enum acp_dma_priority_level { | 75 | enum acp_dma_priority_level { |
| 74 | /* 0x0 Specifies the DMA channel is given normal priority */ | 76 | /* 0x0 Specifies the DMA channel is given normal priority */ |
| 75 | ACP_DMA_PRIORITY_LEVEL_NORMAL = 0x0, | 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 | static int hdmi_codec_remove(struct platform_device *pdev) | 799 | static int hdmi_codec_remove(struct platform_device *pdev) |
| 800 | { | 800 | { |
| 801 | struct device *dev = &pdev->dev; | 801 | snd_soc_unregister_codec(&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); | ||
| 807 | 802 | ||
| 808 | return 0; | 803 | return 0; |
| 809 | } | 804 | } |
| @@ -1722,6 +1722,7 @@ static const struct regmap_config rt5651_regmap = { · 1721 unmodified lines | |||
| 1722 | .num_reg_defaults = ARRAY_SIZE(rt5651_reg), | 1722 | .num_reg_defaults = ARRAY_SIZE(rt5651_reg), |
| 1723 | .ranges = rt5651_ranges, | 1723 | .ranges = rt5651_ranges, |
| 1724 | .num_ranges = ARRAY_SIZE(rt5651_ranges), | 1724 | .num_ranges = ARRAY_SIZE(rt5651_ranges), |
| 1725 | .use_single_rw = true, | ||
| 1725 | }; | 1726 | }; |
| 1726 | 1727 | ||
| 1727 | #if defined(CONFIG_OF) | 1728 | #if defined(CONFIG_OF) |
| @@ -529,10 +529,15 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { · 528 unmodified lines | |||
| 529 | static int sgtl5000_digital_mute(struct snd_soc_dai *codec_dai, int mute) | 529 | static int sgtl5000_digital_mute(struct snd_soc_dai *codec_dai, int mute) |
| 530 | { | 530 | { |
| 531 | struct snd_soc_codec *codec = codec_dai->codec; | 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, | 534 | /* |
| 535 | adcdac_ctrl, mute ? adcdac_ctrl : 0); | 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 | return 0; | 542 | return 0; |
| 538 | } | 543 | } |
| @@ -871,15 +876,26 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream, · 332 unmodified lines | |||
| 871 | static int sgtl5000_set_bias_level(struct snd_soc_codec *codec, | 876 | static int sgtl5000_set_bias_level(struct snd_soc_codec *codec, |
| 872 | enum snd_soc_bias_level level) | 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 | switch (level) { | 882 | switch (level) { |
| 875 | case SND_SOC_BIAS_ON: | 883 | case SND_SOC_BIAS_ON: |
| 876 | case SND_SOC_BIAS_PREPARE: | 884 | case SND_SOC_BIAS_PREPARE: |
| 877 | case SND_SOC_BIAS_STANDBY: | 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 | snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, | 893 | snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, |
| 879 | SGTL5000_REFTOP_POWERUP, | 894 | SGTL5000_REFTOP_POWERUP, |
| 880 | SGTL5000_REFTOP_POWERUP); | 895 | SGTL5000_REFTOP_POWERUP); |
| 881 | break; | 896 | break; |
| 882 | case SND_SOC_BIAS_OFF: | 897 | case SND_SOC_BIAS_OFF: |
| 898 | regcache_cache_only(sgtl->regmap, true); | ||
| 883 | snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, | 899 | snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, |
| 884 | SGTL5000_REFTOP_POWERUP, 0); | 900 | SGTL5000_REFTOP_POWERUP, 0); |
| 885 | break; | 901 | break; |
| @@ -1237,6 +1253,10 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) · 351 unmodified lines | |||
| 1237 | */ | 1253 | */ |
| 1238 | snd_soc_write(codec, SGTL5000_DAP_CTRL, 0); | 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 | return 0; | 1260 | return 0; |
| 1241 | 1261 | ||
| 1242 | err: | 1262 | err: |
| @@ -1204,12 +1204,14 @@ static int wmfw_add_ctl(struct wm_adsp *dsp, struct wm_coeff_ctl *ctl) · 1203 unmodified lines | |||
| 1204 | kcontrol->put = wm_coeff_put_acked; | 1204 | kcontrol->put = wm_coeff_put_acked; |
| 1205 | break; | 1205 | break; |
| 1206 | default: | 1206 | default: |
| 1207 | kcontrol->get = wm_coeff_get; | 1207 | if (kcontrol->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) { |
| 1208 | kcontrol->put = wm_coeff_put; | 1208 | ctl->bytes_ext.max = ctl->len; |
| 1209 | 1209 | ctl->bytes_ext.get = wm_coeff_tlv_get; | |
| 1210 | ctl->bytes_ext.max = ctl->len; | 1210 | ctl->bytes_ext.put = wm_coeff_tlv_put; |
| 1211 | ctl->bytes_ext.get = wm_coeff_tlv_get; | 1211 | } else { |
| 1212 | ctl->bytes_ext.put = wm_coeff_tlv_put; | 1212 | kcontrol->get = wm_coeff_get; |
| 1213 | kcontrol->put = wm_coeff_put; | ||
| 1214 | } | ||
| 1213 | break; | 1215 | break; |
| 1214 | } | 1216 | } |
| 1215 | 1217 | ||
| @@ -104,7 +104,7 @@ · 103 unmodified lines | |||
| 104 | 104 | ||
| 105 | #define SUN8I_I2S_CHAN_CFG_REG 0x30 | 105 | #define SUN8I_I2S_CHAN_CFG_REG 0x30 |
| 106 | #define SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM_MASK GENMASK(6, 4) | 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 | #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM_MASK GENMASK(2, 0) | 108 | #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM_MASK GENMASK(2, 0) |
| 109 | #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM(chan) (chan - 1) | 109 | #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM(chan) (chan - 1) |
| 110 | 110 | ||