.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * lm49453.c - LM49453 ALSA Soc Audio driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2012 Texas Instruments, Inc |
---|
5 | | - * |
---|
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 | 6 | * |
---|
10 | 7 | * Initially based on sound/soc/codecs/wm8350.c |
---|
11 | 8 | */ |
---|
.. | .. |
---|
1221 | 1218 | return 0; |
---|
1222 | 1219 | } |
---|
1223 | 1220 | |
---|
1224 | | -static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute) |
---|
| 1221 | +static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
1225 | 1222 | { |
---|
1226 | 1223 | snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(1)|BIT(0), |
---|
1227 | 1224 | (mute ? (BIT(1)|BIT(0)) : 0)); |
---|
1228 | 1225 | return 0; |
---|
1229 | 1226 | } |
---|
1230 | 1227 | |
---|
1231 | | -static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute) |
---|
| 1228 | +static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
1232 | 1229 | { |
---|
1233 | 1230 | snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(3)|BIT(2), |
---|
1234 | 1231 | (mute ? (BIT(3)|BIT(2)) : 0)); |
---|
1235 | 1232 | return 0; |
---|
1236 | 1233 | } |
---|
1237 | 1234 | |
---|
1238 | | -static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute) |
---|
| 1235 | +static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
1239 | 1236 | { |
---|
1240 | 1237 | snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(5)|BIT(4), |
---|
1241 | 1238 | (mute ? (BIT(5)|BIT(4)) : 0)); |
---|
1242 | 1239 | return 0; |
---|
1243 | 1240 | } |
---|
1244 | 1241 | |
---|
1245 | | -static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute) |
---|
| 1242 | +static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
1246 | 1243 | { |
---|
1247 | 1244 | snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(4), |
---|
1248 | 1245 | (mute ? BIT(4) : 0)); |
---|
1249 | 1246 | return 0; |
---|
1250 | 1247 | } |
---|
1251 | 1248 | |
---|
1252 | | -static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute) |
---|
| 1249 | +static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
1253 | 1250 | { |
---|
1254 | 1251 | snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(7)|BIT(6), |
---|
1255 | 1252 | (mute ? (BIT(7)|BIT(6)) : 0)); |
---|
.. | .. |
---|
1291 | 1288 | .hw_params = lm49453_hw_params, |
---|
1292 | 1289 | .set_sysclk = lm49453_set_dai_sysclk, |
---|
1293 | 1290 | .set_fmt = lm49453_set_dai_fmt, |
---|
1294 | | - .digital_mute = lm49453_hp_mute, |
---|
| 1291 | + .mute_stream = lm49453_hp_mute, |
---|
| 1292 | + .no_capture_mute = 1, |
---|
1295 | 1293 | }; |
---|
1296 | 1294 | |
---|
1297 | 1295 | static const struct snd_soc_dai_ops lm49453_speaker_dai_ops = { |
---|
1298 | 1296 | .hw_params = lm49453_hw_params, |
---|
1299 | 1297 | .set_sysclk = lm49453_set_dai_sysclk, |
---|
1300 | 1298 | .set_fmt = lm49453_set_dai_fmt, |
---|
1301 | | - .digital_mute = lm49453_ls_mute, |
---|
| 1299 | + .mute_stream = lm49453_ls_mute, |
---|
| 1300 | + .no_capture_mute = 1, |
---|
1302 | 1301 | }; |
---|
1303 | 1302 | |
---|
1304 | 1303 | static const struct snd_soc_dai_ops lm49453_haptic_dai_ops = { |
---|
1305 | 1304 | .hw_params = lm49453_hw_params, |
---|
1306 | 1305 | .set_sysclk = lm49453_set_dai_sysclk, |
---|
1307 | 1306 | .set_fmt = lm49453_set_dai_fmt, |
---|
1308 | | - .digital_mute = lm49453_ha_mute, |
---|
| 1307 | + .mute_stream = lm49453_ha_mute, |
---|
| 1308 | + .no_capture_mute = 1, |
---|
1309 | 1309 | }; |
---|
1310 | 1310 | |
---|
1311 | 1311 | static const struct snd_soc_dai_ops lm49453_ep_dai_ops = { |
---|
1312 | 1312 | .hw_params = lm49453_hw_params, |
---|
1313 | 1313 | .set_sysclk = lm49453_set_dai_sysclk, |
---|
1314 | 1314 | .set_fmt = lm49453_set_dai_fmt, |
---|
1315 | | - .digital_mute = lm49453_ep_mute, |
---|
| 1315 | + .mute_stream = lm49453_ep_mute, |
---|
| 1316 | + .no_capture_mute = 1, |
---|
1316 | 1317 | }; |
---|
1317 | 1318 | |
---|
1318 | 1319 | static const struct snd_soc_dai_ops lm49453_lineout_dai_ops = { |
---|
1319 | 1320 | .hw_params = lm49453_hw_params, |
---|
1320 | 1321 | .set_sysclk = lm49453_set_dai_sysclk, |
---|
1321 | 1322 | .set_fmt = lm49453_set_dai_fmt, |
---|
1322 | | - .digital_mute = lm49453_lo_mute, |
---|
| 1323 | + .mute_stream = lm49453_lo_mute, |
---|
| 1324 | + .no_capture_mute = 1, |
---|
1323 | 1325 | }; |
---|
1324 | 1326 | |
---|
1325 | 1327 | /* LM49453 dai structure. */ |
---|