73cfbfa9ca
Add a driver for the Cirrus Logic CS35L56 amplifier. This uses the same component binding API as the CS35L41 driver. This is not a standalone HDA device; it provides control of the CS35L56 for systems that use a combination of an HDA codec and CS35L56 amplifiers with audio routed through the HDA codec. The CS35L56 combines a high-performance mono audio amplifier, Class-H tracking inductive boost converter, Halo Core(TM) DSP and a DC-DC boost converter supporting Class-H tracking. Control interfaces are I2C or SPI through the standard Linux I2C or SPI bus framework. Most chip functionality is controlled by on-board ROM firmware that is always running. Firmware patches can be applied by the driver in the form of a .wmfw file (firmware patch) and/or a .bin file (system tuning). Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20230721132120.5523-12-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only
|
|
*
|
|
* HDA audio driver for Cirrus Logic CS35L56 smart amp
|
|
*
|
|
* Copyright (C) 2023 Cirrus Logic, Inc. and
|
|
* Cirrus Logic International Semiconductor Ltd.
|
|
*/
|
|
|
|
#ifndef __CS35L56_HDA_H__
|
|
#define __CS35L56_HDA_H__
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/gpio/consumer.h>
|
|
#include <linux/firmware/cirrus/cs_dsp.h>
|
|
#include <linux/firmware/cirrus/wmfw.h>
|
|
#include <linux/regulator/consumer.h>
|
|
#include <sound/cs35l56.h>
|
|
|
|
struct dentry;
|
|
|
|
struct cs35l56_hda {
|
|
struct cs35l56_base base;
|
|
struct hda_codec *codec;
|
|
|
|
int index;
|
|
const char *system_name;
|
|
const char *amp_name;
|
|
|
|
struct cs_dsp cs_dsp;
|
|
bool playing;
|
|
bool suspended;
|
|
u8 asp_tx_mask;
|
|
|
|
struct snd_kcontrol *posture_ctl;
|
|
struct snd_kcontrol *volume_ctl;
|
|
struct snd_kcontrol *mixer_ctl[4];
|
|
|
|
#if IS_ENABLED(CONFIG_SND_DEBUG)
|
|
struct dentry *debugfs_root;
|
|
#endif
|
|
};
|
|
|
|
extern const struct dev_pm_ops cs35l56_hda_pm_ops;
|
|
|
|
int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int id);
|
|
void cs35l56_hda_remove(struct device *dev);
|
|
|
|
#endif /*__CS35L56_HDA_H__*/
|