tfa9879.c (3eb66e91a25497065c5322b1268cbc3953642227) tfa9879.c (54b5927067dd79b58032a4938ee13b233f1a368c)
1// SPDX-License-Identifier: GPL-2.0+
2//
3// tfa9879.c -- driver for NXP Semiconductors TFA9879
4//
5// Copyright (C) 2014 Axentia Technologies AB
6// Author: Peter Rosin <peda@axentia.se>
7
8#include <linux/module.h>

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

88 i2s_set << TFA9879_I2S_SET_SHIFT);
89
90 snd_soc_component_update_bits(component, TFA9879_SERIAL_INTERFACE_1,
91 TFA9879_I2S_FS_MASK,
92 fs << TFA9879_I2S_FS_SHIFT);
93 return 0;
94}
95
1// SPDX-License-Identifier: GPL-2.0+
2//
3// tfa9879.c -- driver for NXP Semiconductors TFA9879
4//
5// Copyright (C) 2014 Axentia Technologies AB
6// Author: Peter Rosin <peda@axentia.se>
7
8#include <linux/module.h>

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

88 i2s_set << TFA9879_I2S_SET_SHIFT);
89
90 snd_soc_component_update_bits(component, TFA9879_SERIAL_INTERFACE_1,
91 TFA9879_I2S_FS_MASK,
92 fs << TFA9879_I2S_FS_SHIFT);
93 return 0;
94}
95
96static int tfa9879_digital_mute(struct snd_soc_dai *dai, int mute)
96static int tfa9879_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
97{
98 struct snd_soc_component *component = dai->component;
99
100 snd_soc_component_update_bits(component, TFA9879_MISC_CONTROL,
101 TFA9879_S_MUTE_MASK,
102 !!mute << TFA9879_S_MUTE_SHIFT);
103
104 return 0;

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

246 .max_register = TFA9879_MISC_STATUS,
247 .reg_defaults = tfa9879_regs,
248 .num_reg_defaults = ARRAY_SIZE(tfa9879_regs),
249 .cache_type = REGCACHE_RBTREE,
250};
251
252static const struct snd_soc_dai_ops tfa9879_dai_ops = {
253 .hw_params = tfa9879_hw_params,
97{
98 struct snd_soc_component *component = dai->component;
99
100 snd_soc_component_update_bits(component, TFA9879_MISC_CONTROL,
101 TFA9879_S_MUTE_MASK,
102 !!mute << TFA9879_S_MUTE_SHIFT);
103
104 return 0;

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

246 .max_register = TFA9879_MISC_STATUS,
247 .reg_defaults = tfa9879_regs,
248 .num_reg_defaults = ARRAY_SIZE(tfa9879_regs),
249 .cache_type = REGCACHE_RBTREE,
250};
251
252static const struct snd_soc_dai_ops tfa9879_dai_ops = {
253 .hw_params = tfa9879_hw_params,
254 .digital_mute = tfa9879_digital_mute,
254 .mute_stream = tfa9879_mute_stream,
255 .set_fmt = tfa9879_set_fmt,
255 .set_fmt = tfa9879_set_fmt,
256 .no_capture_mute = 1,
256};
257
258#define TFA9879_RATES SNDRV_PCM_RATE_8000_96000
259
260#define TFA9879_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
261 SNDRV_PCM_FMTBIT_S24_LE)
262
263static struct snd_soc_dai_driver tfa9879_dai = {

--- 60 unchanged lines hidden ---
257};
258
259#define TFA9879_RATES SNDRV_PCM_RATE_8000_96000
260
261#define TFA9879_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
262 SNDRV_PCM_FMTBIT_S24_LE)
263
264static struct snd_soc_dai_driver tfa9879_dai = {

--- 60 unchanged lines hidden ---