aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/arizona.h2
-rw-r--r--sound/soc/codecs/wm5110.c43
-rw-r--r--sound/soc/codecs/wm_adsp.c1
3 files changed, 40 insertions, 6 deletions
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h
index 8b6adb5419bb..0c64a5731513 100644
--- a/sound/soc/codecs/arizona.h
+++ b/sound/soc/codecs/arizona.h
@@ -57,7 +57,7 @@
57#define ARIZONA_CLK_98MHZ 5 57#define ARIZONA_CLK_98MHZ 5
58#define ARIZONA_CLK_147MHZ 6 58#define ARIZONA_CLK_147MHZ 6
59 59
60#define ARIZONA_MAX_DAI 8 60#define ARIZONA_MAX_DAI 10
61#define ARIZONA_MAX_ADSP 4 61#define ARIZONA_MAX_ADSP 4
62 62
63#define ARIZONA_DVFS_SR1_RQ 0x001 63#define ARIZONA_DVFS_SR1_RQ 0x001
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index b47bc4418e30..92b6a6a564df 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -1828,6 +1828,9 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
1828 { "Voice Control DSP", NULL, "DSP3" }, 1828 { "Voice Control DSP", NULL, "DSP3" },
1829 { "Voice Control DSP", NULL, "SYSCLK" }, 1829 { "Voice Control DSP", NULL, "SYSCLK" },
1830 1830
1831 { "Audio Trace DSP", NULL, "DSP1" },
1832 { "Audio Trace DSP", NULL, "SYSCLK" },
1833
1831 { "IN1L PGA", NULL, "IN1L" }, 1834 { "IN1L PGA", NULL, "IN1L" },
1832 { "IN1R PGA", NULL, "IN1R" }, 1835 { "IN1R PGA", NULL, "IN1R" },
1833 1836
@@ -2171,6 +2174,27 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
2171 .formats = WM5110_FORMATS, 2174 .formats = WM5110_FORMATS,
2172 }, 2175 },
2173 }, 2176 },
2177 {
2178 .name = "wm5110-cpu-trace",
2179 .capture = {
2180 .stream_name = "Audio Trace CPU",
2181 .channels_min = 1,
2182 .channels_max = 6,
2183 .rates = WM5110_RATES,
2184 .formats = WM5110_FORMATS,
2185 },
2186 .compress_new = snd_soc_new_compress,
2187 },
2188 {
2189 .name = "wm5110-dsp-trace",
2190 .capture = {
2191 .stream_name = "Audio Trace DSP",
2192 .channels_min = 1,
2193 .channels_max = 6,
2194 .rates = WM5110_RATES,
2195 .formats = WM5110_FORMATS,
2196 },
2197 },
2174}; 2198};
2175 2199
2176static int wm5110_open(struct snd_compr_stream *stream) 2200static int wm5110_open(struct snd_compr_stream *stream)
@@ -2182,6 +2206,8 @@ static int wm5110_open(struct snd_compr_stream *stream)
2182 2206
2183 if (strcmp(rtd->codec_dai->name, "wm5110-dsp-voicectrl") == 0) { 2207 if (strcmp(rtd->codec_dai->name, "wm5110-dsp-voicectrl") == 0) {
2184 n_adsp = 2; 2208 n_adsp = 2;
2209 } else if (strcmp(rtd->codec_dai->name, "wm5110-dsp-trace") == 0) {
2210 n_adsp = 0;
2185 } else { 2211 } else {
2186 dev_err(arizona->dev, 2212 dev_err(arizona->dev,
2187 "No suitable compressed stream for DAI '%s'\n", 2213 "No suitable compressed stream for DAI '%s'\n",
@@ -2194,12 +2220,21 @@ static int wm5110_open(struct snd_compr_stream *stream)
2194 2220
2195static irqreturn_t wm5110_adsp2_irq(int irq, void *data) 2221static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
2196{ 2222{
2197 struct wm5110_priv *florida = data; 2223 struct wm5110_priv *priv = data;
2198 int ret; 2224 struct arizona *arizona = priv->core.arizona;
2225 int serviced = 0;
2226 int i, ret;
2227
2228 for (i = 0; i < WM5110_NUM_ADSP; ++i) {
2229 ret = wm_adsp_compr_handle_irq(&priv->core.adsp[i]);
2230 if (ret != -ENODEV)
2231 serviced++;
2232 }
2199 2233
2200 ret = wm_adsp_compr_handle_irq(&florida->core.adsp[2]); 2234 if (!serviced) {
2201 if (ret == -ENODEV) 2235 dev_err(arizona->dev, "Spurious compressed data IRQ\n");
2202 return IRQ_NONE; 2236 return IRQ_NONE;
2237 }
2203 2238
2204 return IRQ_HANDLED; 2239 return IRQ_HANDLED;
2205} 2240}
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 76ab52d2c670..653dbff81fee 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -2823,7 +2823,6 @@ int wm_adsp_compr_handle_irq(struct wm_adsp *dsp)
2823 mutex_lock(&dsp->pwr_lock); 2823 mutex_lock(&dsp->pwr_lock);
2824 2824
2825 if (!buf) { 2825 if (!buf) {
2826 adsp_err(dsp, "Spurious buffer IRQ\n");
2827 ret = -ENODEV; 2826 ret = -ENODEV;
2828 goto out; 2827 goto out;
2829 } 2828 }