axg-spdifout.c (976e3645923bdd2fe7893aae33fd7a21098bfb28) axg-spdifout.c (f795ff78e266492a5278cbef89d3422bdcf591b0)
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2//
3// Copyright (c) 2018 BayLibre, SAS.
4// Author: Jerome Brunet <jbrunet@baylibre.com>
5
6#include <linux/clk.h>
7#include <linux/module.h>
8#include <linux/of_platform.h>

--- 94 unchanged lines hidden (view full) ---

103 axg_spdifout_disable(priv->map);
104 return 0;
105
106 default:
107 return -EINVAL;
108 }
109}
110
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2//
3// Copyright (c) 2018 BayLibre, SAS.
4// Author: Jerome Brunet <jbrunet@baylibre.com>
5
6#include <linux/clk.h>
7#include <linux/module.h>
8#include <linux/of_platform.h>

--- 94 unchanged lines hidden (view full) ---

103 axg_spdifout_disable(priv->map);
104 return 0;
105
106 default:
107 return -EINVAL;
108 }
109}
110
111static int axg_spdifout_digital_mute(struct snd_soc_dai *dai, int mute)
111static int axg_spdifout_mute(struct snd_soc_dai *dai, int mute, int direction)
112{
113 struct axg_spdifout *priv = snd_soc_dai_get_drvdata(dai);
114
115 /* Use spdif valid bit to perform digital mute */
116 regmap_update_bits(priv->map, SPDIFOUT_CTRL0, SPDIFOUT_CTRL0_VSET,
117 mute ? SPDIFOUT_CTRL0_VSET : 0);
118
119 return 0;

--- 160 unchanged lines hidden (view full) ---

280{
281 struct axg_spdifout *priv = snd_soc_dai_get_drvdata(dai);
282
283 clk_disable_unprepare(priv->pclk);
284}
285
286static const struct snd_soc_dai_ops axg_spdifout_ops = {
287 .trigger = axg_spdifout_trigger,
112{
113 struct axg_spdifout *priv = snd_soc_dai_get_drvdata(dai);
114
115 /* Use spdif valid bit to perform digital mute */
116 regmap_update_bits(priv->map, SPDIFOUT_CTRL0, SPDIFOUT_CTRL0_VSET,
117 mute ? SPDIFOUT_CTRL0_VSET : 0);
118
119 return 0;

--- 160 unchanged lines hidden (view full) ---

280{
281 struct axg_spdifout *priv = snd_soc_dai_get_drvdata(dai);
282
283 clk_disable_unprepare(priv->pclk);
284}
285
286static const struct snd_soc_dai_ops axg_spdifout_ops = {
287 .trigger = axg_spdifout_trigger,
288 .digital_mute = axg_spdifout_digital_mute,
288 .mute_stream = axg_spdifout_mute,
289 .hw_params = axg_spdifout_hw_params,
290 .startup = axg_spdifout_startup,
291 .shutdown = axg_spdifout_shutdown,
289 .hw_params = axg_spdifout_hw_params,
290 .startup = axg_spdifout_startup,
291 .shutdown = axg_spdifout_shutdown,
292 .no_capture_mute = 1,
292};
293
294static struct snd_soc_dai_driver axg_spdifout_dai_drv[] = {
295 {
296 .name = "SPDIF Output",
297 .playback = {
298 .stream_name = "Playback",
299 .channels_min = 1,

--- 155 unchanged lines hidden ---
293};
294
295static struct snd_soc_dai_driver axg_spdifout_dai_drv[] = {
296 {
297 .name = "SPDIF Output",
298 .playback = {
299 .stream_name = "Playback",
300 .channels_min = 1,

--- 155 unchanged lines hidden ---