summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sound/tas2781.h4
-rw-r--r--sound/soc/codecs/hdmi-codec.c6
-rw-r--r--sound/soc/codecs/tas2781-i2c.c3
-rw-r--r--sound/soc/soc-ops-test.c29
4 files changed, 25 insertions, 17 deletions
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 40cd3bd079b5..3875e92f1ec5 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -17,6 +17,10 @@
#ifndef __TAS2781_H__
#define __TAS2781_H__
+#ifdef CONFIG_SND_SOC_TAS2781_ACOUST_I2C
+#include <linux/debugfs.h>
+#endif
+
#include "tas2781-dsp.h"
/* version number */
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 31121f9c18c9..e1933f733af1 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -943,7 +943,7 @@ static void hdmi_codec_jack_report(struct hdmi_codec_priv *hcp,
{
if (jack_status != hcp->jack_status) {
if (hcp->jack)
- snd_soc_jack_report(hcp->jack, jack_status, SND_JACK_LINEOUT);
+ snd_soc_jack_report(hcp->jack, jack_status, SND_JACK_AVOUT);
hcp->jack_status = jack_status;
}
}
@@ -964,7 +964,7 @@ static void plugged_cb(struct device *dev, bool plugged)
else
snd_show_eld(dev, &hcp->eld_parsed);
}
- hdmi_codec_jack_report(hcp, SND_JACK_LINEOUT);
+ hdmi_codec_jack_report(hcp, SND_JACK_AVOUT);
} else {
hdmi_codec_jack_report(hcp, 0);
memset(hcp->eld, 0, sizeof(hcp->eld));
@@ -984,7 +984,7 @@ static int hdmi_codec_set_jack(struct snd_soc_component *component,
* Report the initial jack status which may have been provided
* by the parent hdmi driver while the hpd hook was registered.
*/
- snd_soc_jack_report(jack, hcp->jack_status, SND_JACK_LINEOUT);
+ snd_soc_jack_report(jack, hcp->jack_status, SND_JACK_AVOUT);
return 0;
}
diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index c40d8f754d89..9f4d965a1335 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -14,9 +14,6 @@
//
#include <linux/crc8.h>
-#ifdef CONFIG_SND_SOC_TAS2781_ACOUST_I2C
-#include <linux/debugfs.h>
-#endif
#include <linux/firmware.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
diff --git a/sound/soc/soc-ops-test.c b/sound/soc/soc-ops-test.c
index dc1e482bba6a..1bafa5626d48 100644
--- a/sound/soc/soc-ops-test.c
+++ b/sound/soc/soc-ops-test.c
@@ -481,22 +481,27 @@ static void soc_ops_test_access(struct kunit *test)
.private_data = &priv->component,
.private_value = (unsigned long)&param->mc,
};
- struct snd_ctl_elem_value result;
unsigned int val;
int ret;
+ /* it is too large struct. use kzalloc() */
+ struct snd_ctl_elem_value *result;
+
+ result = kzalloc(sizeof(*result), GFP_KERNEL);
+ if (!result)
+ return;
ret = regmap_write(priv->component.regmap, 0x0, param->init);
KUNIT_ASSERT_FALSE(test, ret);
ret = regmap_write(priv->component.regmap, 0x1, param->init);
KUNIT_ASSERT_FALSE(test, ret);
- result.value.integer.value[0] = param->lctl;
- result.value.integer.value[1] = param->rctl;
+ result->value.integer.value[0] = param->lctl;
+ result->value.integer.value[1] = param->rctl;
- ret = param->put(&kctl, &result);
+ ret = param->put(&kctl, result);
KUNIT_ASSERT_EQ(test, ret, param->ret);
if (ret < 0)
- return;
+ goto end;
ret = regmap_read(priv->component.regmap, 0x0, &val);
KUNIT_ASSERT_FALSE(test, ret);
@@ -506,17 +511,19 @@ static void soc_ops_test_access(struct kunit *test)
KUNIT_ASSERT_FALSE(test, ret);
KUNIT_EXPECT_EQ(test, val, (param->init & ~param->rmask) | param->rreg);
- result.value.integer.value[0] = 0;
- result.value.integer.value[1] = 0;
+ result->value.integer.value[0] = 0;
+ result->value.integer.value[1] = 0;
- ret = param->get(&kctl, &result);
+ ret = param->get(&kctl, result);
KUNIT_ASSERT_GE(test, ret, 0);
- KUNIT_EXPECT_EQ(test, result.value.integer.value[0], param->lctl);
+ KUNIT_EXPECT_EQ(test, result->value.integer.value[0], param->lctl);
if (param->layout != SOC_OPS_TEST_SINGLE)
- KUNIT_EXPECT_EQ(test, result.value.integer.value[1], param->rctl);
+ KUNIT_EXPECT_EQ(test, result->value.integer.value[1], param->rctl);
else
- KUNIT_EXPECT_EQ(test, result.value.integer.value[1], 0);
+ KUNIT_EXPECT_EQ(test, result->value.integer.value[1], 0);
+end:
+ kfree(result);
}
KUNIT_ARRAY_PARAM(all_info_tests, all_info_test_params, info_test_desc);