linux/sound/soc/codecs/rt1316-sdw.h
Krzysztof Kozlowski 70207b95b2
ASoC: codecs: rt1316: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:17 +09:00

53 lines
1.3 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* rt1316-sdw.h -- RT1316 SDCA ALSA SoC audio driver header
*
* Copyright(c) 2021 Realtek Semiconductor Corp.
*/
#ifndef __RT1316_SDW_H__
#define __RT1316_SDW_H__
#include <linux/regmap.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_type.h>
#include <linux/soundwire/sdw_registers.h>
#include <sound/soc.h>
/* RT1316 SDCA Control - function number */
#define FUNC_NUM_SMART_AMP 0x04
/* RT1316 SDCA entity */
#define RT1316_SDCA_ENT_PDE23 0x31
#define RT1316_SDCA_ENT_PDE27 0x32
#define RT1316_SDCA_ENT_PDE22 0x33
#define RT1316_SDCA_ENT_PDE24 0x34
#define RT1316_SDCA_ENT_XU24 0x24
#define RT1316_SDCA_ENT_FU21 0x03
#define RT1316_SDCA_ENT_UDMPU21 0x02
/* RT1316 SDCA control */
#define RT1316_SDCA_CTL_SAMPLE_FREQ_INDEX 0x10
#define RT1316_SDCA_CTL_REQ_POWER_STATE 0x01
#define RT1316_SDCA_CTL_BYPASS 0x01
#define RT1316_SDCA_CTL_FU_MUTE 0x01
#define RT1316_SDCA_CTL_FU_VOLUME 0x02
#define RT1316_SDCA_CTL_UDMPU_CLUSTER 0x10
/* RT1316 SDCA channel */
#define CH_L 0x01
#define CH_R 0x02
struct rt1316_sdw_priv {
struct snd_soc_component *component;
struct regmap *regmap;
struct sdw_slave *sdw_slave;
struct sdw_bus_params params;
bool hw_init;
bool first_hw_init;
unsigned char *bq_params;
unsigned int bq_params_cnt;
};
#endif /* __RT1316_SDW_H__ */