.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * isabelle.c - Low power high fidelity audio codec driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2012 Texas Instruments, Inc |
---|
5 | 6 | * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; version 2 of the License. |
---|
9 | | - * |
---|
10 | | - * |
---|
11 | 7 | * Initially based on sound/soc/codecs/twl6040.c |
---|
12 | | - * |
---|
13 | 8 | */ |
---|
14 | 9 | #include <linux/module.h> |
---|
15 | 10 | #include <linux/moduleparam.h> |
---|
.. | .. |
---|
865 | 860 | { "LINEOUT2", NULL, "LINEOUT2 Driver" }, |
---|
866 | 861 | }; |
---|
867 | 862 | |
---|
868 | | -static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute) |
---|
| 863 | +static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
869 | 864 | { |
---|
870 | 865 | snd_soc_component_update_bits(dai->component, ISABELLE_DAC1_SOFTRAMP_REG, |
---|
871 | 866 | BIT(4), (mute ? BIT(4) : 0)); |
---|
.. | .. |
---|
873 | 868 | return 0; |
---|
874 | 869 | } |
---|
875 | 870 | |
---|
876 | | -static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute) |
---|
| 871 | +static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
877 | 872 | { |
---|
878 | 873 | snd_soc_component_update_bits(dai->component, ISABELLE_DAC2_SOFTRAMP_REG, |
---|
879 | 874 | BIT(4), (mute ? BIT(4) : 0)); |
---|
.. | .. |
---|
881 | 876 | return 0; |
---|
882 | 877 | } |
---|
883 | 878 | |
---|
884 | | -static int isabelle_line_mute(struct snd_soc_dai *dai, int mute) |
---|
| 879 | +static int isabelle_line_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
885 | 880 | { |
---|
886 | 881 | snd_soc_component_update_bits(dai->component, ISABELLE_DAC3_SOFTRAMP_REG, |
---|
887 | 882 | BIT(4), (mute ? BIT(4) : 0)); |
---|
.. | .. |
---|
1019 | 1014 | static const struct snd_soc_dai_ops isabelle_hs_dai_ops = { |
---|
1020 | 1015 | .hw_params = isabelle_hw_params, |
---|
1021 | 1016 | .set_fmt = isabelle_set_dai_fmt, |
---|
1022 | | - .digital_mute = isabelle_hs_mute, |
---|
| 1017 | + .mute_stream = isabelle_hs_mute, |
---|
| 1018 | + .no_capture_mute = 1, |
---|
1023 | 1019 | }; |
---|
1024 | 1020 | |
---|
1025 | 1021 | static const struct snd_soc_dai_ops isabelle_hf_dai_ops = { |
---|
1026 | 1022 | .hw_params = isabelle_hw_params, |
---|
1027 | 1023 | .set_fmt = isabelle_set_dai_fmt, |
---|
1028 | | - .digital_mute = isabelle_hf_mute, |
---|
| 1024 | + .mute_stream = isabelle_hf_mute, |
---|
| 1025 | + .no_capture_mute = 1, |
---|
1029 | 1026 | }; |
---|
1030 | 1027 | |
---|
1031 | 1028 | static const struct snd_soc_dai_ops isabelle_line_dai_ops = { |
---|
1032 | 1029 | .hw_params = isabelle_hw_params, |
---|
1033 | 1030 | .set_fmt = isabelle_set_dai_fmt, |
---|
1034 | | - .digital_mute = isabelle_line_mute, |
---|
| 1031 | + .mute_stream = isabelle_line_mute, |
---|
| 1032 | + .no_capture_mute = 1, |
---|
1035 | 1033 | }; |
---|
1036 | 1034 | |
---|
1037 | 1035 | static const struct snd_soc_dai_ops isabelle_ul_dai_ops = { |
---|