aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8753.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8753.c')
-rw-r--r--sound/soc/codecs/wm8753.c90
1 files changed, 50 insertions, 40 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 1d5eca89de60..a6e8f3f7f052 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1301,6 +1301,51 @@ static int wm8753_set_bias_level(struct snd_soc_codec *codec,
1301 * 3. Voice disabled - HIFI over HIFI 1301 * 3. Voice disabled - HIFI over HIFI
1302 * 4. Voice disabled - HIFI over HIFI, uses voice DAI LRC for capture 1302 * 4. Voice disabled - HIFI over HIFI, uses voice DAI LRC for capture
1303 */ 1303 */
1304static struct snd_soc_dai_ops wm8753_dai_ops_hifi_mode1 = {
1305 .hw_params = wm8753_i2s_hw_params,
1306 .digital_mute = wm8753_mute,
1307 .set_fmt = wm8753_mode1h_set_dai_fmt,
1308 .set_clkdiv = wm8753_set_dai_clkdiv,
1309 .set_pll = wm8753_set_dai_pll,
1310 .set_sysclk = wm8753_set_dai_sysclk,
1311};
1312
1313static struct snd_soc_dai_ops wm8753_dai_ops_voice_mode1 = {
1314 .hw_params = wm8753_pcm_hw_params,
1315 .digital_mute = wm8753_mute,
1316 .set_fmt = wm8753_mode1v_set_dai_fmt,
1317 .set_clkdiv = wm8753_set_dai_clkdiv,
1318 .set_pll = wm8753_set_dai_pll,
1319 .set_sysclk = wm8753_set_dai_sysclk,
1320};
1321
1322static struct snd_soc_dai_ops wm8753_dai_ops_voice_mode2 = {
1323 .hw_params = wm8753_pcm_hw_params,
1324 .digital_mute = wm8753_mute,
1325 .set_fmt = wm8753_mode2_set_dai_fmt,
1326 .set_clkdiv = wm8753_set_dai_clkdiv,
1327 .set_pll = wm8753_set_dai_pll,
1328 .set_sysclk = wm8753_set_dai_sysclk,
1329};
1330
1331static struct snd_soc_dai_ops wm8753_dai_ops_hifi_mode3 = {
1332 .hw_params = wm8753_i2s_hw_params,
1333 .digital_mute = wm8753_mute,
1334 .set_fmt = wm8753_mode3_4_set_dai_fmt,
1335 .set_clkdiv = wm8753_set_dai_clkdiv,
1336 .set_pll = wm8753_set_dai_pll,
1337 .set_sysclk = wm8753_set_dai_sysclk,
1338};
1339
1340static struct snd_soc_dai_ops wm8753_dai_ops_hifi_mode4 = {
1341 .hw_params = wm8753_i2s_hw_params,
1342 .digital_mute = wm8753_mute,
1343 .set_fmt = wm8753_mode3_4_set_dai_fmt,
1344 .set_clkdiv = wm8753_set_dai_clkdiv,
1345 .set_pll = wm8753_set_dai_pll,
1346 .set_sysclk = wm8753_set_dai_sysclk,
1347};
1348
1304static const struct snd_soc_dai wm8753_all_dai[] = { 1349static const struct snd_soc_dai wm8753_all_dai[] = {
1305/* DAI HiFi mode 1 */ 1350/* DAI HiFi mode 1 */
1306{ .name = "WM8753 HiFi", 1351{ .name = "WM8753 HiFi",
@@ -1317,14 +1362,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1317 .channels_max = 2, 1362 .channels_max = 2,
1318 .rates = WM8753_RATES, 1363 .rates = WM8753_RATES,
1319 .formats = WM8753_FORMATS}, 1364 .formats = WM8753_FORMATS},
1320 .ops = { 1365 .ops = &wm8753_dai_ops_hifi_mode1,
1321 .hw_params = wm8753_i2s_hw_params,
1322 .digital_mute = wm8753_mute,
1323 .set_fmt = wm8753_mode1h_set_dai_fmt,
1324 .set_clkdiv = wm8753_set_dai_clkdiv,
1325 .set_pll = wm8753_set_dai_pll,
1326 .set_sysclk = wm8753_set_dai_sysclk,
1327 },
1328}, 1366},
1329/* DAI Voice mode 1 */ 1367/* DAI Voice mode 1 */
1330{ .name = "WM8753 Voice", 1368{ .name = "WM8753 Voice",
@@ -1341,14 +1379,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1341 .channels_max = 2, 1379 .channels_max = 2,
1342 .rates = WM8753_RATES, 1380 .rates = WM8753_RATES,
1343 .formats = WM8753_FORMATS,}, 1381 .formats = WM8753_FORMATS,},
1344 .ops = { 1382 .ops = &wm8753_dai_ops_voice_mode1,
1345 .hw_params = wm8753_pcm_hw_params,
1346 .digital_mute = wm8753_mute,
1347 .set_fmt = wm8753_mode1v_set_dai_fmt,
1348 .set_clkdiv = wm8753_set_dai_clkdiv,
1349 .set_pll = wm8753_set_dai_pll,
1350 .set_sysclk = wm8753_set_dai_sysclk,
1351 },
1352}, 1383},
1353/* DAI HiFi mode 2 - dummy */ 1384/* DAI HiFi mode 2 - dummy */
1354{ .name = "WM8753 HiFi", 1385{ .name = "WM8753 HiFi",
@@ -1369,14 +1400,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1369 .channels_max = 2, 1400 .channels_max = 2,
1370 .rates = WM8753_RATES, 1401 .rates = WM8753_RATES,
1371 .formats = WM8753_FORMATS,}, 1402 .formats = WM8753_FORMATS,},
1372 .ops = { 1403 .ops = &wm8753_dai_ops_voice_mode2,
1373 .hw_params = wm8753_pcm_hw_params,
1374 .digital_mute = wm8753_mute,
1375 .set_fmt = wm8753_mode2_set_dai_fmt,
1376 .set_clkdiv = wm8753_set_dai_clkdiv,
1377 .set_pll = wm8753_set_dai_pll,
1378 .set_sysclk = wm8753_set_dai_sysclk,
1379 },
1380}, 1404},
1381/* DAI HiFi mode 3 */ 1405/* DAI HiFi mode 3 */
1382{ .name = "WM8753 HiFi", 1406{ .name = "WM8753 HiFi",
@@ -1393,14 +1417,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1393 .channels_max = 2, 1417 .channels_max = 2,
1394 .rates = WM8753_RATES, 1418 .rates = WM8753_RATES,
1395 .formats = WM8753_FORMATS,}, 1419 .formats = WM8753_FORMATS,},
1396 .ops = { 1420 .ops = &wm8753_dai_ops_hifi_mode3,
1397 .hw_params = wm8753_i2s_hw_params,
1398 .digital_mute = wm8753_mute,
1399 .set_fmt = wm8753_mode3_4_set_dai_fmt,
1400 .set_clkdiv = wm8753_set_dai_clkdiv,
1401 .set_pll = wm8753_set_dai_pll,
1402 .set_sysclk = wm8753_set_dai_sysclk,
1403 },
1404}, 1421},
1405/* DAI Voice mode 3 - dummy */ 1422/* DAI Voice mode 3 - dummy */
1406{ .name = "WM8753 Voice", 1423{ .name = "WM8753 Voice",
@@ -1421,14 +1438,7 @@ static const struct snd_soc_dai wm8753_all_dai[] = {
1421 .channels_max = 2, 1438 .channels_max = 2,
1422 .rates = WM8753_RATES, 1439 .rates = WM8753_RATES,
1423 .formats = WM8753_FORMATS,}, 1440 .formats = WM8753_FORMATS,},
1424 .ops = { 1441 .ops = &wm8753_dai_ops_hifi_mode4,
1425 .hw_params = wm8753_i2s_hw_params,
1426 .digital_mute = wm8753_mute,
1427 .set_fmt = wm8753_mode3_4_set_dai_fmt,
1428 .set_clkdiv = wm8753_set_dai_clkdiv,
1429 .set_pll = wm8753_set_dai_pll,
1430 .set_sysclk = wm8753_set_dai_sysclk,
1431 },
1432}, 1442},
1433/* DAI Voice mode 4 - dummy */ 1443/* DAI Voice mode 4 - dummy */
1434{ .name = "WM8753 Voice", 1444{ .name = "WM8753 Voice",