Skip to content

Commit

Permalink
ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.
Browse files Browse the repository at this point in the history
Initial commit of the Cirrus Logic cs35l33 8V boosted class D
amplifier.

Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Paul Handrigan authored and Mark Brown committed Jun 27, 2016
1 parent 1a695a9 commit 3333cb7
Show file tree
Hide file tree
Showing 5 changed files with 1,591 additions and 0 deletions.
48 changes: 48 additions & 0 deletions include/sound/cs35l33.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* linux/sound/cs35l33.h -- Platform data for CS35l33
*
* Copyright (c) 2016 Cirrus Logic Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef __CS35L33_H
#define __CS35L33_H

struct cs35l33_hg {
bool enable_hg_algo;
unsigned int mem_depth;
unsigned int release_rate;
unsigned int hd_rm;
unsigned int ldo_thld;
unsigned int ldo_path_disable;
unsigned int ldo_entry_delay;
bool vp_hg_auto;
unsigned int vp_hg;
unsigned int vp_hg_rate;
unsigned int vp_hg_va;
};

struct cs35l33_pdata {
/* Boost Controller Voltage Setting */
unsigned int boost_ctl;

/* Boost Controller Peak Current */
unsigned int boost_ipk;

/* Amplifier Drive Select */
unsigned int amp_drv_sel;

/* soft volume ramp */
unsigned int ramp_rate;

/* IMON adc scale */
unsigned int imon_adc_scale;

/* H/G algo configuration */
struct cs35l33_hg hg_config;
};

#endif /* __CS35L33_H */
5 changes: 5 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_BT_SCO
select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC
select SND_SOC_CS35L32 if I2C
select SND_SOC_CS35L33 if I2C
select SND_SOC_CS42L51_I2C if I2C
select SND_SOC_CS42L52 if I2C && INPUT
select SND_SOC_CS42L56 if I2C && INPUT
Expand Down Expand Up @@ -380,6 +381,10 @@ config SND_SOC_CS35L32
tristate "Cirrus Logic CS35L32 CODEC"
depends on I2C

config SND_SOC_CS35L33
tristate "Cirrus Logic CS35L33 CODEC"
depends on I2C

config SND_SOC_CS42L51
tristate

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ snd-soc-arizona-objs := arizona.o
snd-soc-bt-sco-objs := bt-sco.o
snd-soc-cq93vc-objs := cq93vc.o
snd-soc-cs35l32-objs := cs35l32.o
snd-soc-cs35l33-objs := cs35l33.o
snd-soc-cs42l51-objs := cs42l51.o
snd-soc-cs42l51-i2c-objs := cs42l51-i2c.o
snd-soc-cs42l52-objs := cs42l52.o
Expand Down Expand Up @@ -250,6 +251,7 @@ obj-$(CONFIG_SND_SOC_ARIZONA) += snd-soc-arizona.o
obj-$(CONFIG_SND_SOC_BT_SCO) += snd-soc-bt-sco.o
obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o
obj-$(CONFIG_SND_SOC_CS35L32) += snd-soc-cs35l32.o
obj-$(CONFIG_SND_SOC_CS35L33) += snd-soc-cs35l33.o
obj-$(CONFIG_SND_SOC_CS42L51) += snd-soc-cs42l51.o
obj-$(CONFIG_SND_SOC_CS42L51_I2C) += snd-soc-cs42l51-i2c.o
obj-$(CONFIG_SND_SOC_CS42L52) += snd-soc-cs42l52.o
Expand Down
Loading

0 comments on commit 3333cb7

Please sign in to comment.