Commit 2f42a776 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/ak4613',...

Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/ak4613', 'asoc/topic/au1761' and 'asoc/topic/blackfin' into asoc-next
...@@ -119,7 +119,7 @@ static int bfin_eval_adau1373_codec_init(struct snd_soc_pcm_runtime *rtd) ...@@ -119,7 +119,7 @@ static int bfin_eval_adau1373_codec_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
static struct snd_soc_ops bfin_eval_adau1373_ops = { static const struct snd_soc_ops bfin_eval_adau1373_ops = {
.hw_params = bfin_eval_adau1373_hw_params, .hw_params = bfin_eval_adau1373_hw_params,
}; };
......
...@@ -64,7 +64,7 @@ static int bfin_eval_adav80x_codec_init(struct snd_soc_pcm_runtime *rtd) ...@@ -64,7 +64,7 @@ static int bfin_eval_adav80x_codec_init(struct snd_soc_pcm_runtime *rtd)
return 0; return 0;
} }
static struct snd_soc_ops bfin_eval_adav80x_ops = { static const struct snd_soc_ops bfin_eval_adav80x_ops = {
.hw_params = bfin_eval_adav80x_hw_params, .hw_params = bfin_eval_adav80x_hw_params,
}; };
......
...@@ -303,12 +303,14 @@ config SND_SOC_ADAU1761 ...@@ -303,12 +303,14 @@ config SND_SOC_ADAU1761
select SND_SOC_ADAU17X1 select SND_SOC_ADAU17X1
config SND_SOC_ADAU1761_I2C config SND_SOC_ADAU1761_I2C
tristate tristate "Analog Devices AU1761 CODEC - I2C"
depends on I2C
select SND_SOC_ADAU1761 select SND_SOC_ADAU1761
select REGMAP_I2C select REGMAP_I2C
config SND_SOC_ADAU1761_SPI config SND_SOC_ADAU1761_SPI
tristate tristate "Analog Devices AU1761 CODEC - SPI"
depends on SPI
select SND_SOC_ADAU1761 select SND_SOC_ADAU1761
select REGMAP_SPI select REGMAP_SPI
......
...@@ -75,6 +75,12 @@ ...@@ -75,6 +75,12 @@
#define DFS_DOUBLE_SPEED (1 << 2) #define DFS_DOUBLE_SPEED (1 << 2)
#define DFS_QUAD_SPEED (2 << 2) #define DFS_QUAD_SPEED (2 << 2)
/* ICTRL */
#define ICTRL_MASK (0x3)
/* OCTRL */
#define OCTRL_MASK (0x3F)
struct ak4613_formats { struct ak4613_formats {
unsigned int width; unsigned int width;
unsigned int fmt; unsigned int fmt;
...@@ -365,8 +371,8 @@ static int ak4613_dai_hw_params(struct snd_pcm_substream *substream, ...@@ -365,8 +371,8 @@ static int ak4613_dai_hw_params(struct snd_pcm_substream *substream,
snd_soc_update_bits(codec, CTRL1, FMT_MASK, fmt_ctrl); snd_soc_update_bits(codec, CTRL1, FMT_MASK, fmt_ctrl);
snd_soc_update_bits(codec, CTRL2, DFS_MASK, ctrl2); snd_soc_update_bits(codec, CTRL2, DFS_MASK, ctrl2);
snd_soc_write(codec, ICTRL, priv->ic); snd_soc_update_bits(codec, ICTRL, ICTRL_MASK, priv->ic);
snd_soc_write(codec, OCTRL, priv->oc); snd_soc_update_bits(codec, OCTRL, OCTRL_MASK, priv->oc);
hw_params_end: hw_params_end:
if (ret < 0) if (ret < 0)
......
This diff is collapsed.
...@@ -23,6 +23,23 @@ ...@@ -23,6 +23,23 @@
#define WM_ADSP_COMPR_OK 0 #define WM_ADSP_COMPR_OK 0
#define WM_ADSP_COMPR_VOICE_TRIGGER 1 #define WM_ADSP_COMPR_VOICE_TRIGGER 1
#define WM_ADSP2_REGION_0 BIT(0)
#define WM_ADSP2_REGION_1 BIT(1)
#define WM_ADSP2_REGION_2 BIT(2)
#define WM_ADSP2_REGION_3 BIT(3)
#define WM_ADSP2_REGION_4 BIT(4)
#define WM_ADSP2_REGION_5 BIT(5)
#define WM_ADSP2_REGION_6 BIT(6)
#define WM_ADSP2_REGION_7 BIT(7)
#define WM_ADSP2_REGION_8 BIT(8)
#define WM_ADSP2_REGION_9 BIT(9)
#define WM_ADSP2_REGION_1_9 (WM_ADSP2_REGION_1 | \
WM_ADSP2_REGION_2 | WM_ADSP2_REGION_3 | \
WM_ADSP2_REGION_4 | WM_ADSP2_REGION_5 | \
WM_ADSP2_REGION_6 | WM_ADSP2_REGION_7 | \
WM_ADSP2_REGION_8 | WM_ADSP2_REGION_9)
#define WM_ADSP2_REGION_ALL (WM_ADSP2_REGION_0 | WM_ADSP2_REGION_1_9)
struct wm_adsp_region { struct wm_adsp_region {
int type; int type;
unsigned int base; unsigned int base;
...@@ -40,6 +57,7 @@ struct wm_adsp_compr_buf; ...@@ -40,6 +57,7 @@ struct wm_adsp_compr_buf;
struct wm_adsp { struct wm_adsp {
const char *part; const char *part;
int rev;
int num; int num;
int type; int type;
struct device *dev; struct device *dev;
...@@ -75,6 +93,8 @@ struct wm_adsp { ...@@ -75,6 +93,8 @@ struct wm_adsp {
struct mutex pwr_lock; struct mutex pwr_lock;
unsigned int lock_regions;
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_root; struct dentry *debugfs_root;
char *wmfw_file_name; char *wmfw_file_name;
...@@ -113,6 +133,10 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w, ...@@ -113,6 +133,10 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
int wm_adsp2_early_event(struct snd_soc_dapm_widget *w, int wm_adsp2_early_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event, struct snd_kcontrol *kcontrol, int event,
unsigned int freq); unsigned int freq);
int wm_adsp2_lock(struct wm_adsp *adsp, unsigned int regions);
irqreturn_t wm_adsp2_bus_error(struct wm_adsp *adsp);
int wm_adsp2_event(struct snd_soc_dapm_widget *w, int wm_adsp2_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event); struct snd_kcontrol *kcontrol, int event);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment