isabelle.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) | isabelle.c (54b5927067dd79b58032a4938ee13b233f1a368c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * isabelle.c - Low power high fidelity audio codec driver 4 * 5 * Copyright (c) 2012 Texas Instruments, Inc 6 * 7 * Initially based on sound/soc/codecs/twl6040.c 8 */ --- 846 unchanged lines hidden (view full) --- 855 856 { "LINEOUT1 Driver", NULL, "LINEOUT1 Mixer" }, 857 { "LINEOUT2 Driver", NULL, "LINEOUT2 Mixer" }, 858 859 { "LINEOUT1", NULL, "LINEOUT1 Driver" }, 860 { "LINEOUT2", NULL, "LINEOUT2 Driver" }, 861}; 862 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * isabelle.c - Low power high fidelity audio codec driver 4 * 5 * Copyright (c) 2012 Texas Instruments, Inc 6 * 7 * Initially based on sound/soc/codecs/twl6040.c 8 */ --- 846 unchanged lines hidden (view full) --- 855 856 { "LINEOUT1 Driver", NULL, "LINEOUT1 Mixer" }, 857 { "LINEOUT2 Driver", NULL, "LINEOUT2 Mixer" }, 858 859 { "LINEOUT1", NULL, "LINEOUT1 Driver" }, 860 { "LINEOUT2", NULL, "LINEOUT2 Driver" }, 861}; 862 |
863static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute) | 863static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute, int direction) |
864{ 865 snd_soc_component_update_bits(dai->component, ISABELLE_DAC1_SOFTRAMP_REG, 866 BIT(4), (mute ? BIT(4) : 0)); 867 868 return 0; 869} 870 | 864{ 865 snd_soc_component_update_bits(dai->component, ISABELLE_DAC1_SOFTRAMP_REG, 866 BIT(4), (mute ? BIT(4) : 0)); 867 868 return 0; 869} 870 |
871static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute) | 871static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute, int direction) |
872{ 873 snd_soc_component_update_bits(dai->component, ISABELLE_DAC2_SOFTRAMP_REG, 874 BIT(4), (mute ? BIT(4) : 0)); 875 876 return 0; 877} 878 | 872{ 873 snd_soc_component_update_bits(dai->component, ISABELLE_DAC2_SOFTRAMP_REG, 874 BIT(4), (mute ? BIT(4) : 0)); 875 876 return 0; 877} 878 |
879static int isabelle_line_mute(struct snd_soc_dai *dai, int mute) | 879static int isabelle_line_mute(struct snd_soc_dai *dai, int mute, int direction) |
880{ 881 snd_soc_component_update_bits(dai->component, ISABELLE_DAC3_SOFTRAMP_REG, 882 BIT(4), (mute ? BIT(4) : 0)); 883 884 return 0; 885} 886 887static int isabelle_set_bias_level(struct snd_soc_component *component, --- 121 unchanged lines hidden (view full) --- 1009 1010/* Formates supported by Isabelle driver. */ 1011#define ISABELLE_FORMATS (SNDRV_PCM_FMTBIT_S20_3LE |\ 1012 SNDRV_PCM_FMTBIT_S32_LE) 1013 1014static const struct snd_soc_dai_ops isabelle_hs_dai_ops = { 1015 .hw_params = isabelle_hw_params, 1016 .set_fmt = isabelle_set_dai_fmt, | 880{ 881 snd_soc_component_update_bits(dai->component, ISABELLE_DAC3_SOFTRAMP_REG, 882 BIT(4), (mute ? BIT(4) : 0)); 883 884 return 0; 885} 886 887static int isabelle_set_bias_level(struct snd_soc_component *component, --- 121 unchanged lines hidden (view full) --- 1009 1010/* Formates supported by Isabelle driver. */ 1011#define ISABELLE_FORMATS (SNDRV_PCM_FMTBIT_S20_3LE |\ 1012 SNDRV_PCM_FMTBIT_S32_LE) 1013 1014static const struct snd_soc_dai_ops isabelle_hs_dai_ops = { 1015 .hw_params = isabelle_hw_params, 1016 .set_fmt = isabelle_set_dai_fmt, |
1017 .digital_mute = isabelle_hs_mute, | 1017 .mute_stream = isabelle_hs_mute, 1018 .no_capture_mute = 1, |
1018}; 1019 1020static const struct snd_soc_dai_ops isabelle_hf_dai_ops = { 1021 .hw_params = isabelle_hw_params, 1022 .set_fmt = isabelle_set_dai_fmt, | 1019}; 1020 1021static const struct snd_soc_dai_ops isabelle_hf_dai_ops = { 1022 .hw_params = isabelle_hw_params, 1023 .set_fmt = isabelle_set_dai_fmt, |
1023 .digital_mute = isabelle_hf_mute, | 1024 .mute_stream = isabelle_hf_mute, 1025 .no_capture_mute = 1, |
1024}; 1025 1026static const struct snd_soc_dai_ops isabelle_line_dai_ops = { 1027 .hw_params = isabelle_hw_params, 1028 .set_fmt = isabelle_set_dai_fmt, | 1026}; 1027 1028static const struct snd_soc_dai_ops isabelle_line_dai_ops = { 1029 .hw_params = isabelle_hw_params, 1030 .set_fmt = isabelle_set_dai_fmt, |
1029 .digital_mute = isabelle_line_mute, | 1031 .mute_stream = isabelle_line_mute, 1032 .no_capture_mute = 1, |
1030}; 1031 1032static const struct snd_soc_dai_ops isabelle_ul_dai_ops = { 1033 .hw_params = isabelle_hw_params, 1034 .set_fmt = isabelle_set_dai_fmt, 1035}; 1036 1037/* ISABELLE dai structure */ --- 116 unchanged lines hidden --- | 1033}; 1034 1035static const struct snd_soc_dai_ops isabelle_ul_dai_ops = { 1036 .hw_params = isabelle_hw_params, 1037 .set_fmt = isabelle_set_dai_fmt, 1038}; 1039 1040/* ISABELLE dai structure */ --- 116 unchanged lines hidden --- |