Alsa-devel
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
August 2015
- 122 participants
- 316 discussions
[alsa-devel] [RFC PATCH 04/10] ASoC: implement DAI links in a list.
by mengdong.lin@intel.com 10 Aug '15
by mengdong.lin@intel.com 10 Aug '15
10 Aug '15
From: Mengdong Lin <mengdong.lin(a)intel.com>
Implement a dai link list for the soc card.
And API snd_soc_add_dai_link() is defined for machine drivers to add DAI
links dynamically based on topology.
Signed-off-by: Mengdong Lin <mengdong.lin(a)intel.com>
diff --git a/include/sound/soc.h b/include/sound/soc.h
index e2b7b0f..79891e2 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1011,6 +1011,8 @@ struct snd_soc_dai_link {
/* pmdown_time is ignored at stop */
unsigned int ignore_pmdown_time:1;
+
+ struct list_head list; /* dai link list of the soc card */
};
struct snd_soc_codec_conf {
@@ -1078,8 +1080,11 @@ struct snd_soc_card {
long pmdown_time;
/* CPU <--> Codec DAI links */
- struct snd_soc_dai_link *dai_link;
- int num_links;
+ struct snd_soc_dai_link *dai_link; /* predefined links only */
+ int num_links; /* predefined links only */
+ struct list_head dai_link_list; /* all links except the dummy ones */
+ int num_dai_links;
+
struct list_head rtd_list;
int num_rtd;
@@ -1619,6 +1624,9 @@ int snd_soc_of_get_dai_link_codecs(struct device *dev,
struct device_node *of_node,
struct snd_soc_dai_link *dai_link);
+void snd_soc_add_dai_link(struct snd_soc_card *card,
+ struct snd_soc_dai_link *dai_link);
+
#include <sound/soc-dai.h>
#ifdef CONFIG_DEBUG_FS
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ddfdd1d..58eac57 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1235,6 +1235,27 @@ static int soc_init_dai_link(struct snd_soc_card *card,
return 0;
}
+/**
+ * snd_soc_add_dai_link - Add a DAI link dynamically
+ * @card: The ASoC card to which the DAI link is added
+ * @dai_link: The new DAI link to add
+ *
+ * This function adds a DAI link to the ASoC card, and creates a ASoC
+ * runtime for the link.
+ *
+ * Note: For adding DAI links dynamically by machine drivers based on
+ * the topology info when probing the platform component. And machine
+ * drivers can still define static DAI links in dai_link array.
+ */
+void snd_soc_add_dai_link(struct snd_soc_card *card,
+ struct snd_soc_dai_link *dai_link)
+{
+ lockdep_assert_held(&client_mutex);
+ list_add_tail(&dai_link->list, &card->dai_link_list);
+ card->num_dai_links++;
+}
+EXPORT_SYMBOL_GPL(snd_soc_add_dai_link);
+
static void soc_set_name_prefix(struct snd_soc_card *card,
struct snd_soc_component *component)
{
@@ -1729,6 +1750,10 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
goto base_error;
}
+ /* all predefined resources are ready, store non-dummy links */
+ for (i = 0; i < card->num_links; i++)
+ snd_soc_add_dai_link(card, card->dai_link+i);
+
/* initialize the register cache for each available codec */
list_for_each_entry(codec, &codec_list, list) {
if (codec->cache_init)
@@ -2486,6 +2511,9 @@ int snd_soc_register_card(struct snd_soc_card *card)
snd_soc_initialize_card_lists(card);
+ INIT_LIST_HEAD(&card->dai_link_list);
+ card->num_dai_links = 0;
+
INIT_LIST_HEAD(&card->rtd_list);
card->num_rtd = 0;
--
1.9.1
1
0
[alsa-devel] [RFC PATCH 03/10] ASoC: soc_bind_dai_link() change 2nd argument to DAI link pointer
by mengdong.lin@intel.com 10 Aug '15
by mengdong.lin@intel.com 10 Aug '15
10 Aug '15
From: Mengdong Lin <mengdong.lin(a)intel.com>
Just code refactoring, to reuse it if new DAI Links are added later
based on topology in component probing phase.
Signed-off-by: Mengdong Lin <mengdong.lin(a)intel.com>
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e9e8956..ddfdd1d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -961,9 +961,9 @@ static struct snd_soc_dai *snd_soc_find_dai(
return NULL;
}
-static int soc_bind_dai_link(struct snd_soc_card *card, int num)
+static int soc_bind_dai_link(struct snd_soc_card *card,
+ struct snd_soc_dai_link *dai_link)
{
- struct snd_soc_dai_link *dai_link = &card->dai_link[num];
struct snd_soc_pcm_runtime *rtd;
struct snd_soc_dai_link_component *codecs = dai_link->codecs;
struct snd_soc_dai_link_component cpu_dai_component;
@@ -972,7 +972,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
const char *platform_name;
int i;
- dev_dbg(card->dev, "ASoC: binding %s at idx %d\n", dai_link->name, num);
+ dev_dbg(card->dev, "ASoC: binding %s\n", dai_link->name);
if (snd_soc_get_pcm_runtime(card, dai_link->name)) {
dev_dbg(card->dev, "ASoC: dai link %s already bound\n",
@@ -1717,7 +1717,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
/* bind DAIs */
for (i = 0; i < card->num_links; i++) {
- ret = soc_bind_dai_link(card, i);
+ ret = soc_bind_dai_link(card, &card->dai_link[i]);
if (ret != 0)
goto base_error;
}
--
1.9.1
1
0
[alsa-devel] [RFC PATCH 01/10] ASoC: change the PCM runtime array to a list
by mengdong.lin@intel.com 10 Aug '15
by mengdong.lin@intel.com 10 Aug '15
10 Aug '15
From: Mengdong Lin <mengdong.lin(a)intel.com>
Currently the number of DAI links is statically defined by the machine
driver at build time using an array. This makes it difficult to shrink/
grow the number of DAI links at runtime in order to reflect any changes
in topology.
We can change the DAI link array in the core to a list so that PCMs and
FE DAI links can be added and deleted at runtime to reflect changes in
use case and DSP topology. The machine driver can still register DAI links
as an array.
As the 1st step, this patch change the PCM runtime array to a list. A new
PCM runtime is added to the list when a DAI link is bound successfully.
Later patches will further implement the DAI link list.
More:
- define snd_soc_new/free_pcm_runtime() to create/free a runtime.
- define soc_add_pcm_runtime() to add a runtime to the rtd list.
- define soc_remove_pcm_runtimes() to clean up the runtime list.
- traverse the rtd list to probe the link components and dais.
- Add a field "num" to PCM runtime struct, used to specify the device
number when creating the pcm device, and for a simple card to access
its dai_props array.
- The following 3rd party machine/platform drivers either iterate the rtd
list or use snd_soc_get_pcm_runtime() to access a rtd:
intel/atom/sst-mfld-platform-pcm.c
intel/boards/cht_bsw_rt5672
intel/boards/cht_bsw_rt5645
fsl/imx-wm8962.c
fsl/fsl-asoc-card.c
samsung/bells.c
samsung/littlemill.c
samsung/odroidx2_max98090.c
samsung/snow.c
samsung/speyside.c
samsung/tobermory.c
pxa/mioa701_wm9713.c
tegra/tegra_wm8903.c
Signed-off-by: Mengdong Lin <mengdong.lin(a)intel.com>
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 4cef20e..e2b7b0f 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1080,7 +1080,7 @@ struct snd_soc_card {
/* CPU <--> Codec DAI links */
struct snd_soc_dai_link *dai_link;
int num_links;
- struct snd_soc_pcm_runtime *rtd;
+ struct list_head rtd_list;
int num_rtd;
/* optional codec specific configuration */
@@ -1175,6 +1175,9 @@ struct snd_soc_pcm_runtime {
struct dentry *debugfs_dpcm_root;
struct dentry *debugfs_dpcm_state;
#endif
+
+ unsigned int num; /* 0-based and monotonic increasing */
+ struct list_head list; /* rtd list of the soc card */
};
/* mixer control */
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index de43887..b80cf09 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -211,12 +211,15 @@ static int fsl_asoc_card_set_bias_level(struct snd_soc_card *card,
enum snd_soc_bias_level level)
{
struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(card);
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
struct codec_priv *codec_priv = &priv->codec_priv;
struct device *dev = card->dev;
unsigned int pll_out;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec_dai = rtd->codec_dai;
if (dapm->dev != codec_dai->dev)
return 0;
@@ -383,11 +386,14 @@ static int fsl_asoc_card_audmux_init(struct device_node *np,
static int fsl_asoc_card_late_probe(struct snd_soc_card *card)
{
struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(card);
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
struct codec_priv *codec_priv = &priv->codec_priv;
struct device *dev = card->dev;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec_dai = rtd->codec_dai;
ret = snd_soc_dai_set_sysclk(codec_dai, codec_priv->mclk_id,
codec_priv->mclk_freq, SND_SOC_CLOCK_IN);
if (ret) {
diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c
index b38b98c..201a70d 100644
--- a/sound/soc/fsl/imx-wm8962.c
+++ b/sound/soc/fsl/imx-wm8962.c
@@ -69,13 +69,16 @@ static int imx_wm8962_set_bias_level(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
struct imx_priv *priv = &card_priv;
struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
struct device *dev = &priv->pdev->dev;
unsigned int pll_out;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec_dai = rtd->codec_dai;
if (dapm->dev != codec_dai->dev)
return 0;
@@ -135,12 +138,15 @@ static int imx_wm8962_set_bias_level(struct snd_soc_card *card,
static int imx_wm8962_late_probe(struct snd_soc_card *card)
{
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
struct imx_priv *priv = &card_priv;
struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
struct device *dev = &priv->pdev->dev;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec_dai = rtd->codec_dai;
ret = snd_soc_dai_set_sysclk(codec_dai, WM8962_SYSCLK_MCLK,
data->clk_frequency, SND_SOC_CLOCK_IN);
if (ret < 0)
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 3ff76d4..95a2f91 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -45,7 +45,7 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
struct simple_dai_props *dai_props =
- &priv->dai_props[rtd - rtd->card->rtd];
+ &priv->dai_props[rtd->num];
int ret;
ret = clk_prepare_enable(dai_props->cpu_dai.clk);
@@ -64,7 +64,7 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
struct simple_dai_props *dai_props =
- &priv->dai_props[rtd - rtd->card->rtd];
+ &priv->dai_props[rtd->num];
clk_disable_unprepare(dai_props->cpu_dai.clk);
@@ -78,8 +78,7 @@ static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
- struct simple_dai_props *dai_props =
- &priv->dai_props[rtd - rtd->card->rtd];
+ struct simple_dai_props *dai_props = &priv->dai_props[rtd->num];
unsigned int mclk, mclk_fs = 0;
int ret = 0;
@@ -172,10 +171,9 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
struct snd_soc_dai *codec = rtd->codec_dai;
struct snd_soc_dai *cpu = rtd->cpu_dai;
struct simple_dai_props *dai_props;
- int num, ret;
+ int ret;
- num = rtd - rtd->card->rtd;
- dai_props = &priv->dai_props[num];
+ dai_props = &priv->dai_props[rtd->num];
ret = __asoc_simple_card_dai_init(codec, &dai_props->codec_dai);
if (ret < 0)
return ret;
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index 683e501..5ae8ae2 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -777,15 +777,15 @@ static int sst_platform_remove(struct platform_device *pdev)
static int sst_soc_prepare(struct device *dev)
{
struct sst_data *drv = dev_get_drvdata(dev);
- int i;
+ struct snd_soc_pcm_runtime *rtd;
/* suspend all pcms first */
snd_soc_suspend(drv->soc_card->dev);
snd_soc_poweroff(drv->soc_card->dev);
/* set the SSPs to idle */
- for (i = 0; i < drv->soc_card->num_rtd; i++) {
- struct snd_soc_dai *dai = drv->soc_card->rtd[i].cpu_dai;
+ list_for_each_entry(rtd, &drv->soc_card->rtd_list, list) {
+ struct snd_soc_dai *dai = rtd->cpu_dai;
if (dai->active) {
send_ssp_cmd(dai, dai->name, 0);
@@ -799,11 +799,11 @@ static int sst_soc_prepare(struct device *dev)
static void sst_soc_complete(struct device *dev)
{
struct sst_data *drv = dev_get_drvdata(dev);
- int i;
+ struct snd_soc_pcm_runtime *rtd;
/* restart SSPs */
- for (i = 0; i < drv->soc_card->num_rtd; i++) {
- struct snd_soc_dai *dai = drv->soc_card->rtd[i].cpu_dai;
+ list_for_each_entry(rtd, &drv->soc_card->rtd_list, list) {
+ struct snd_soc_dai *dai = rtd->cpu_dai;
if (dai->active) {
sst_handle_vb_timer(dai, true);
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index bdcaf46..fade1a2 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -47,12 +47,9 @@ struct cht_mc_private {
static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
{
- int i;
-
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_pcm_runtime *rtd;
- rtd = card->rtd + i;
+ list_for_each_entry(rtd, &card->rtd_list, list) {
if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI,
strlen(CHT_CODEC_DAI)))
return rtd->codec_dai;
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index 2c9cc5b..fee43bd 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -46,12 +46,9 @@ static struct snd_soc_jack_pin cht_bsw_headset_pins[] = {
static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
{
- int i;
+ struct snd_soc_pcm_runtime *rtd;
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_pcm_runtime *rtd;
-
- rtd = card->rtd + i;
+ list_for_each_entry(rtd, &card->rtd_list, list) {
if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI,
strlen(CHT_CODEC_DAI)))
return rtd->codec_dai;
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index a9615a57..4f6cafe 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -81,8 +81,12 @@ static int rear_amp_power(struct snd_soc_codec *codec, int power)
static int rear_amp_event(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kctl, int event)
{
- struct snd_soc_codec *codec = widget->dapm->card->rtd[0].codec;
+ struct snd_soc_card *card = widget->dapm->card;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_codec *codec;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec = rtd->codec;
return rear_amp_power(codec, SND_SOC_DAPM_EVENT_ON(event));
}
diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c
index e5f05e6..3dd246f 100644
--- a/sound/soc/samsung/bells.c
+++ b/sound/soc/samsung/bells.c
@@ -58,11 +58,16 @@ static int bells_set_bias_level(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *codec_dai = card->rtd[DAI_DSP_CODEC].codec_dai;
- struct snd_soc_codec *codec = codec_dai->codec;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
+ struct snd_soc_codec *codec;
struct bells_drvdata *bells = card->drvdata;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_DSP_CODEC].name);
+ codec_dai = rtd->codec_dai;
+ codec = codec_dai->codec;
+
if (dapm->dev != codec_dai->dev)
return 0;
@@ -99,11 +104,16 @@ static int bells_set_bias_level_post(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *codec_dai = card->rtd[DAI_DSP_CODEC].codec_dai;
- struct snd_soc_codec *codec = codec_dai->codec;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
+ struct snd_soc_codec *codec;
struct bells_drvdata *bells = card->drvdata;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_DSP_CODEC].name);
+ codec_dai = rtd->codec_dai;
+ codec = codec_dai->codec;
+
if (dapm->dev != codec_dai->dev)
return 0;
@@ -137,14 +147,22 @@ static int bells_set_bias_level_post(struct snd_soc_card *card,
static int bells_late_probe(struct snd_soc_card *card)
{
struct bells_drvdata *bells = card->drvdata;
- struct snd_soc_codec *wm0010 = card->rtd[DAI_AP_DSP].codec;
- struct snd_soc_codec *codec = card->rtd[DAI_DSP_CODEC].codec;
- struct snd_soc_dai *aif1_dai = card->rtd[DAI_DSP_CODEC].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_codec *wm0010;
+ struct snd_soc_codec *codec;
+ struct snd_soc_dai *aif1_dai;
struct snd_soc_dai *aif2_dai;
struct snd_soc_dai *aif3_dai;
struct snd_soc_dai *wm9081_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_AP_DSP].name);
+ wm0010 = rtd->codec;
+
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_DSP_CODEC].name);
+ codec = rtd->codec;
+ aif1_dai = rtd->codec_dai;
+
ret = snd_soc_codec_set_sysclk(codec, ARIZONA_CLK_SYSCLK,
ARIZONA_CLK_SRC_FLL1,
bells->sysclk_rate,
@@ -181,7 +199,8 @@ static int bells_late_probe(struct snd_soc_card *card)
return ret;
}
- aif2_dai = card->rtd[DAI_CODEC_CP].cpu_dai;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_CODEC_CP].name);
+ aif2_dai = rtd->cpu_dai;
ret = snd_soc_dai_set_sysclk(aif2_dai, ARIZONA_CLK_ASYNCCLK, 0, 0);
if (ret != 0) {
@@ -192,8 +211,9 @@ static int bells_late_probe(struct snd_soc_card *card)
if (card->num_rtd == DAI_CODEC_SUB)
return 0;
- aif3_dai = card->rtd[DAI_CODEC_SUB].cpu_dai;
- wm9081_dai = card->rtd[DAI_CODEC_SUB].codec_dai;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_CODEC_SUB].name);
+ aif3_dai = rtd->cpu_dai;
+ wm9081_dai = rtd->codec_dai;
ret = snd_soc_dai_set_sysclk(aif3_dai, ARIZONA_CLK_SYSCLK, 0, 0);
if (ret != 0) {
diff --git a/sound/soc/samsung/littlemill.c b/sound/soc/samsung/littlemill.c
index 31a820e..7cb204e 100644
--- a/sound/soc/samsung/littlemill.c
+++ b/sound/soc/samsung/littlemill.c
@@ -23,9 +23,13 @@ static int littlemill_set_bias_level(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *aif1_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *aif1_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ aif1_dai = rtd->codec_dai;
+
if (dapm->dev != aif1_dai->dev)
return 0;
@@ -66,9 +70,13 @@ static int littlemill_set_bias_level_post(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *aif1_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *aif1_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ aif1_dai = rtd->codec_dai;
+
if (dapm->dev != aif1_dai->dev)
return 0;
@@ -168,9 +176,13 @@ static int bbclk_ev(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
struct snd_soc_card *card = w->dapm->card;
- struct snd_soc_dai *aif2_dai = card->rtd[1].cpu_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *aif2_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
+ aif2_dai = rtd->cpu_dai;
+
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
ret = snd_soc_dai_set_pll(aif2_dai, WM8994_FLL2,
@@ -245,11 +257,19 @@ static struct snd_soc_jack littlemill_headset;
static int littlemill_late_probe(struct snd_soc_card *card)
{
- struct snd_soc_codec *codec = card->rtd[0].codec;
- struct snd_soc_dai *aif1_dai = card->rtd[0].codec_dai;
- struct snd_soc_dai *aif2_dai = card->rtd[1].cpu_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_codec *codec;
+ struct snd_soc_dai *aif1_dai;
+ struct snd_soc_dai *aif2_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec = rtd->codec;
+ aif1_dai = rtd->codec_dai;
+
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
+ aif2_dai = rtd->cpu_dai;
+
ret = snd_soc_dai_set_sysclk(aif1_dai, WM8994_SYSCLK_MCLK2,
32768, SND_SOC_CLOCK_IN);
if (ret < 0)
diff --git a/sound/soc/samsung/odroidx2_max98090.c b/sound/soc/samsung/odroidx2_max98090.c
index 596f118..0421727 100644
--- a/sound/soc/samsung/odroidx2_max98090.c
+++ b/sound/soc/samsung/odroidx2_max98090.c
@@ -25,10 +25,15 @@ static struct snd_soc_dai_link odroidx2_dai[];
static int odroidx2_late_probe(struct snd_soc_card *card)
{
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
- struct snd_soc_dai *cpu_dai = card->rtd[0].cpu_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
+ struct snd_soc_dai *cpu_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec_dai = rtd->codec_dai;
+ cpu_dai = rtd->cpu_dai;
+
ret = snd_soc_dai_set_sysclk(codec_dai, 0, MAX98090_MCLK,
SND_SOC_CLOCK_IN);
diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c
index 7651dc9..0969577 100644
--- a/sound/soc/samsung/snow.c
+++ b/sound/soc/samsung/snow.c
@@ -35,10 +35,15 @@ static struct snd_soc_dai_link snow_dai[] = {
static int snow_late_probe(struct snd_soc_card *card)
{
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
- struct snd_soc_dai *cpu_dai = card->rtd[0].cpu_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
+ struct snd_soc_dai *cpu_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec_dai = rtd->codec_dai;
+ cpu_dai = rtd->cpu_dai;
+
/* Set the MCLK rate for the codec */
ret = snd_soc_dai_set_sysclk(codec_dai, 0,
FIN_PLL_RATE, SND_SOC_CLOCK_IN);
diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c
index d1ae21c..083ef5e 100644
--- a/sound/soc/samsung/speyside.c
+++ b/sound/soc/samsung/speyside.c
@@ -25,9 +25,13 @@ static int speyside_set_bias_level(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *codec_dai = card->rtd[1].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
+ codec_dai = rtd->codec_dai;
+
if (dapm->dev != codec_dai->dev)
return 0;
@@ -57,9 +61,13 @@ static int speyside_set_bias_level_post(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *codec_dai = card->rtd[1].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
+ codec_dai = rtd->codec_dai;
+
if (dapm->dev != codec_dai->dev)
return 0;
diff --git a/sound/soc/samsung/tobermory.c b/sound/soc/samsung/tobermory.c
index 85ccfb7..3310eda 100644
--- a/sound/soc/samsung/tobermory.c
+++ b/sound/soc/samsung/tobermory.c
@@ -23,9 +23,13 @@ static int tobermory_set_bias_level(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec_dai = rtd->codec_dai;
+
if (dapm->dev != codec_dai->dev)
return 0;
@@ -62,9 +66,13 @@ static int tobermory_set_bias_level_post(struct snd_soc_card *card,
struct snd_soc_dapm_context *dapm,
enum snd_soc_bias_level level)
{
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_dai *codec_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec_dai = rtd->codec_dai;
+
if (dapm->dev != codec_dai->dev)
return 0;
@@ -170,10 +178,15 @@ static struct snd_soc_jack_pin tobermory_headset_pins[] = {
static int tobermory_late_probe(struct snd_soc_card *card)
{
- struct snd_soc_codec *codec = card->rtd[0].codec;
- struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
+ struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_codec *codec;
+ struct snd_soc_dai *codec_dai;
int ret;
+ rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
+ codec = rtd->codec;
+ codec_dai = rtd->codec_dai;
+
ret = snd_soc_dai_set_sysclk(codec_dai, WM8962_SYSCLK_MCLK,
32768, SND_SOC_CLOCK_IN);
if (ret < 0)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1b63a03..fb78674 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -537,26 +537,76 @@ static inline void snd_soc_debugfs_exit(void)
struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
const char *dai_link, int stream)
{
- int i;
+ struct snd_soc_pcm_runtime *rtd;
- for (i = 0; i < card->num_links; i++) {
- if (card->rtd[i].dai_link->no_pcm &&
- !strcmp(card->rtd[i].dai_link->name, dai_link))
- return card->rtd[i].pcm->streams[stream].substream;
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ if (rtd->dai_link->no_pcm &&
+ !strcmp(rtd->dai_link->name, dai_link))
+ return rtd->pcm->streams[stream].substream;
}
dev_dbg(card->dev, "ASoC: failed to find dai link %s\n", dai_link);
return NULL;
}
EXPORT_SYMBOL_GPL(snd_soc_get_dai_substream);
+static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
+ struct snd_soc_card *card, struct snd_soc_dai_link *dai_link)
+{
+ struct snd_soc_pcm_runtime *rtd;
+
+ rtd = devm_kzalloc(card->dev,
+ sizeof(struct snd_soc_pcm_runtime), GFP_KERNEL);
+ if (!rtd)
+ return NULL;
+
+ rtd->card = card;
+ rtd->dai_link = dai_link;
+ rtd->codec_dais = devm_kzalloc(card->dev,
+ sizeof(struct snd_soc_dai *) *
+ dai_link->num_codecs,
+ GFP_KERNEL);
+ if (!rtd->codec_dais)
+ return NULL;
+
+ return rtd;
+}
+
+static void soc_free_pcm_runtime(struct snd_soc_card *card,
+ struct snd_soc_pcm_runtime *rtd)
+{
+ if (rtd->codec_dai)
+ devm_kfree(card->dev, rtd->codec_dais);
+ devm_kfree(card->dev, rtd);
+}
+
+static void soc_add_pcm_runtime(struct snd_soc_card *card,
+ struct snd_soc_pcm_runtime *rtd)
+{
+ list_add_tail(&rtd->list, &card->rtd_list);
+ rtd->num = card->num_rtd;
+ card->num_rtd++;
+}
+
+static void soc_remove_pcm_runtimes(struct snd_soc_card *card)
+{
+ struct snd_soc_pcm_runtime *rtd, *_rtd;
+
+ list_for_each_entry_safe(rtd, _rtd, &card->rtd_list, list) {
+ list_del(&rtd->list);
+ soc_free_pcm_runtime(card, rtd);
+ }
+
+ card->num_rtd = 0;
+}
+
struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card,
const char *dai_link)
{
- int i;
+ struct snd_soc_pcm_runtime *rtd;
- for (i = 0; i < card->num_links; i++) {
- if (!strcmp(card->rtd[i].dai_link->name, dai_link))
- return &card->rtd[i];
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ if (!strcmp(rtd->dai_link->name, dai_link))
+ return rtd;
}
dev_dbg(card->dev, "ASoC: failed to find rtd %s\n", dai_link);
return NULL;
@@ -578,7 +628,8 @@ int snd_soc_suspend(struct device *dev)
{
struct snd_soc_card *card = dev_get_drvdata(dev);
struct snd_soc_codec *codec;
- int i, j;
+ struct snd_soc_pcm_runtime *rtd;
+ int i;
/* If the card is not initialized yet there is nothing to do */
if (!card->instantiated)
@@ -595,13 +646,13 @@ int snd_soc_suspend(struct device *dev)
snd_power_change_state(card->snd_card, SNDRV_CTL_POWER_D3hot);
/* mute any active DACs */
- for (i = 0; i < card->num_rtd; i++) {
+ list_for_each_entry(rtd, &card->rtd_list, list) {
- if (card->rtd[i].dai_link->ignore_suspend)
+ if (rtd->dai_link->ignore_suspend)
continue;
- for (j = 0; j < card->rtd[i].num_codecs; j++) {
- struct snd_soc_dai *dai = card->rtd[i].codec_dais[j];
+ for (i = 0; i < rtd->num_codecs; i++) {
+ struct snd_soc_dai *dai = rtd->codec_dais[i];
struct snd_soc_dai_driver *drv = dai->driver;
if (drv->ops->digital_mute && dai->playback_active)
@@ -610,20 +661,20 @@ int snd_soc_suspend(struct device *dev)
}
/* suspend all pcms */
- for (i = 0; i < card->num_rtd; i++) {
- if (card->rtd[i].dai_link->ignore_suspend)
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ if (rtd->dai_link->ignore_suspend)
continue;
- snd_pcm_suspend_all(card->rtd[i].pcm);
+ snd_pcm_suspend_all(rtd->pcm);
}
if (card->suspend_pre)
card->suspend_pre(card);
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
- if (card->rtd[i].dai_link->ignore_suspend)
+ if (rtd->dai_link->ignore_suspend)
continue;
if (cpu_dai->driver->suspend && !cpu_dai->driver->bus_control)
@@ -631,19 +682,19 @@ int snd_soc_suspend(struct device *dev)
}
/* close any waiting streams */
- for (i = 0; i < card->num_rtd; i++)
- flush_delayed_work(&card->rtd[i].delayed_work);
+ list_for_each_entry(rtd, &card->rtd_list, list)
+ flush_delayed_work(&rtd->delayed_work);
- for (i = 0; i < card->num_rtd; i++) {
+ list_for_each_entry(rtd, &card->rtd_list, list) {
- if (card->rtd[i].dai_link->ignore_suspend)
+ if (rtd->dai_link->ignore_suspend)
continue;
- snd_soc_dapm_stream_event(&card->rtd[i],
+ snd_soc_dapm_stream_event(rtd,
SNDRV_PCM_STREAM_PLAYBACK,
SND_SOC_DAPM_STREAM_SUSPEND);
- snd_soc_dapm_stream_event(&card->rtd[i],
+ snd_soc_dapm_stream_event(rtd,
SNDRV_PCM_STREAM_CAPTURE,
SND_SOC_DAPM_STREAM_SUSPEND);
}
@@ -690,10 +741,10 @@ int snd_soc_suspend(struct device *dev)
}
}
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
- if (card->rtd[i].dai_link->ignore_suspend)
+ if (rtd->dai_link->ignore_suspend)
continue;
if (cpu_dai->driver->suspend && cpu_dai->driver->bus_control)
@@ -717,8 +768,9 @@ static void soc_resume_deferred(struct work_struct *work)
{
struct snd_soc_card *card =
container_of(work, struct snd_soc_card, deferred_resume_work);
+ struct snd_soc_pcm_runtime *rtd;
struct snd_soc_codec *codec;
- int i, j;
+ int i;
/* our power state is still SNDRV_CTL_POWER_D3hot from suspend time,
* so userspace apps are blocked from touching us
@@ -733,10 +785,10 @@ static void soc_resume_deferred(struct work_struct *work)
card->resume_pre(card);
/* resume control bus DAIs */
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
- if (card->rtd[i].dai_link->ignore_suspend)
+ if (rtd->dai_link->ignore_suspend)
continue;
if (cpu_dai->driver->resume && cpu_dai->driver->bus_control)
@@ -751,28 +803,28 @@ static void soc_resume_deferred(struct work_struct *work)
}
}
- for (i = 0; i < card->num_rtd; i++) {
+ list_for_each_entry(rtd, &card->rtd_list, list) {
- if (card->rtd[i].dai_link->ignore_suspend)
+ if (rtd->dai_link->ignore_suspend)
continue;
- snd_soc_dapm_stream_event(&card->rtd[i],
+ snd_soc_dapm_stream_event(rtd,
SNDRV_PCM_STREAM_PLAYBACK,
SND_SOC_DAPM_STREAM_RESUME);
- snd_soc_dapm_stream_event(&card->rtd[i],
+ snd_soc_dapm_stream_event(rtd,
SNDRV_PCM_STREAM_CAPTURE,
SND_SOC_DAPM_STREAM_RESUME);
}
/* unmute any active DACs */
- for (i = 0; i < card->num_rtd; i++) {
+ list_for_each_entry(rtd, &card->rtd_list, list) {
- if (card->rtd[i].dai_link->ignore_suspend)
+ if (rtd->dai_link->ignore_suspend)
continue;
- for (j = 0; j < card->rtd[i].num_codecs; j++) {
- struct snd_soc_dai *dai = card->rtd[i].codec_dais[j];
+ for (i = 0; i < rtd->num_codecs; i++) {
+ struct snd_soc_dai *dai = rtd->codec_dais[i];
struct snd_soc_dai_driver *drv = dai->driver;
if (drv->ops->digital_mute && dai->playback_active)
@@ -780,10 +832,10 @@ static void soc_resume_deferred(struct work_struct *work)
}
}
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
- if (card->rtd[i].dai_link->ignore_suspend)
+ if (rtd->dai_link->ignore_suspend)
continue;
if (cpu_dai->driver->resume && !cpu_dai->driver->bus_control)
@@ -808,15 +860,14 @@ int snd_soc_resume(struct device *dev)
{
struct snd_soc_card *card = dev_get_drvdata(dev);
bool bus_control = false;
- int i;
+ struct snd_soc_pcm_runtime *rtd;
/* If the card is not initialized yet there is nothing to do */
if (!card->instantiated)
return 0;
/* activate pins from sleep state */
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_pcm_runtime *rtd = &card->rtd[i];
+ list_for_each_entry(rtd, &card->rtd_list, list) {
struct snd_soc_dai **codec_dais = rtd->codec_dais;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
int j;
@@ -837,8 +888,8 @@ int snd_soc_resume(struct device *dev)
* have that problem and may take a substantial amount of time to resume
* due to I/O costs and anti-pop so handle them out of line.
*/
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
bus_control |= cpu_dai->driver->bus_control;
}
if (bus_control) {
@@ -913,16 +964,26 @@ static struct snd_soc_dai *snd_soc_find_dai(
static int soc_bind_dai_link(struct snd_soc_card *card, int num)
{
struct snd_soc_dai_link *dai_link = &card->dai_link[num];
- struct snd_soc_pcm_runtime *rtd = &card->rtd[num];
+ struct snd_soc_pcm_runtime *rtd;
struct snd_soc_dai_link_component *codecs = dai_link->codecs;
struct snd_soc_dai_link_component cpu_dai_component;
- struct snd_soc_dai **codec_dais = rtd->codec_dais;
+ struct snd_soc_dai **codec_dais;
struct snd_soc_platform *platform;
const char *platform_name;
int i;
dev_dbg(card->dev, "ASoC: binding %s at idx %d\n", dai_link->name, num);
+ if (snd_soc_get_pcm_runtime(card, dai_link->name)) {
+ dev_dbg(card->dev, "ASoC: dai link %s already bound\n",
+ dai_link->name);
+ return 0;
+ }
+
+ rtd = soc_new_pcm_runtime(card, dai_link);
+ if (!rtd)
+ return -ENOMEM;
+
cpu_dai_component.name = dai_link->cpu_name;
cpu_dai_component.of_node = dai_link->cpu_of_node;
cpu_dai_component.dai_name = dai_link->cpu_dai_name;
@@ -930,18 +991,19 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
if (!rtd->cpu_dai) {
dev_err(card->dev, "ASoC: CPU DAI %s not registered\n",
dai_link->cpu_dai_name);
- return -EPROBE_DEFER;
+ goto _err_defer;
}
rtd->num_codecs = dai_link->num_codecs;
/* Find CODEC from registered CODECs */
+ codec_dais = rtd->codec_dais;
for (i = 0; i < rtd->num_codecs; i++) {
codec_dais[i] = snd_soc_find_dai(&codecs[i]);
if (!codec_dais[i]) {
dev_err(card->dev, "ASoC: CODEC DAI %s not registered\n",
codecs[i].dai_name);
- return -EPROBE_DEFER;
+ goto _err_defer;
}
}
@@ -973,9 +1035,12 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
return -EPROBE_DEFER;
}
- card->num_rtd++;
-
+ soc_add_pcm_runtime(card, rtd);
return 0;
+
+_err_defer:
+ soc_free_pcm_runtime(card, rtd);
+ return -EPROBE_DEFER;
}
static void soc_remove_component(struct snd_soc_component *component)
@@ -1014,9 +1079,9 @@ static void soc_remove_dai(struct snd_soc_dai *dai, int order)
}
}
-static void soc_remove_link_dais(struct snd_soc_card *card, int num, int order)
+static void soc_remove_link_dais(struct snd_soc_card *card,
+ struct snd_soc_pcm_runtime *rtd, int order)
{
- struct snd_soc_pcm_runtime *rtd = &card->rtd[num];
int i;
/* unregister the rtd device */
@@ -1032,10 +1097,9 @@ static void soc_remove_link_dais(struct snd_soc_card *card, int num, int order)
soc_remove_dai(rtd->cpu_dai, order);
}
-static void soc_remove_link_components(struct snd_soc_card *card, int num,
- int order)
+static void soc_remove_link_components(struct snd_soc_card *card,
+ struct snd_soc_pcm_runtime *rtd, int order)
{
- struct snd_soc_pcm_runtime *rtd = &card->rtd[num];
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
struct snd_soc_platform *platform = rtd->platform;
struct snd_soc_component *component;
@@ -1061,21 +1125,20 @@ static void soc_remove_link_components(struct snd_soc_card *card, int num,
static void soc_remove_dai_links(struct snd_soc_card *card)
{
- int dai, order;
+ int order;
+ struct snd_soc_pcm_runtime *rtd;
for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
order++) {
- for (dai = 0; dai < card->num_rtd; dai++)
- soc_remove_link_dais(card, dai, order);
+ list_for_each_entry(rtd, &card->rtd_list, list)
+ soc_remove_link_dais(card, rtd, order);
}
for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
order++) {
- for (dai = 0; dai < card->num_rtd; dai++)
- soc_remove_link_components(card, dai, order);
+ list_for_each_entry(rtd, &card->rtd_list, list)
+ soc_remove_link_components(card, rtd, order);
}
-
- card->num_rtd = 0;
}
static void soc_set_name_prefix(struct snd_soc_card *card,
@@ -1220,10 +1283,10 @@ static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd,
return 0;
}
-static int soc_probe_link_components(struct snd_soc_card *card, int num,
+static int soc_probe_link_components(struct snd_soc_card *card,
+ struct snd_soc_pcm_runtime *rtd,
int order)
{
- struct snd_soc_pcm_runtime *rtd = &card->rtd[num];
struct snd_soc_platform *platform = rtd->platform;
struct snd_soc_component *component;
int i, ret;
@@ -1319,15 +1382,15 @@ static int soc_link_dai_widgets(struct snd_soc_card *card,
return 0;
}
-static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
+static int soc_probe_link_dais(struct snd_soc_card *card,
+ struct snd_soc_pcm_runtime *rtd, int order)
{
- struct snd_soc_dai_link *dai_link = &card->dai_link[num];
- struct snd_soc_pcm_runtime *rtd = &card->rtd[num];
+ struct snd_soc_dai_link *dai_link = rtd->dai_link;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
int i, ret;
dev_dbg(card->dev, "ASoC: probe %s dai link %d late %d\n",
- card->name, num, order);
+ card->name, rtd->num, order);
/* set default power off timeout */
rtd->pmdown_time = pmdown_time;
@@ -1372,7 +1435,7 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
if (cpu_dai->driver->compress_dai) {
/*create compress_device"*/
- ret = soc_new_compress(rtd, num);
+ ret = soc_new_compress(rtd, rtd->num);
if (ret < 0) {
dev_err(card->dev, "ASoC: can't create compress %s\n",
dai_link->stream_name);
@@ -1382,7 +1445,7 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
if (!dai_link->params) {
/* create the pcm */
- ret = soc_new_pcm(rtd, num);
+ ret = soc_new_pcm(rtd, rtd->num);
if (ret < 0) {
dev_err(card->dev, "ASoC: can't create pcm %s :%d\n",
dai_link->stream_name, ret);
@@ -1552,6 +1615,7 @@ EXPORT_SYMBOL_GPL(snd_soc_runtime_set_dai_fmt);
static int snd_soc_instantiate_card(struct snd_soc_card *card)
{
struct snd_soc_codec *codec;
+ struct snd_soc_pcm_runtime *rtd;
int ret, i, order;
mutex_lock(&client_mutex);
@@ -1624,8 +1688,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
/* probe all components used by DAI links on this card */
for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
order++) {
- for (i = 0; i < card->num_links; i++) {
- ret = soc_probe_link_components(card, i, order);
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ ret = soc_probe_link_components(card, rtd, order);
if (ret < 0) {
dev_err(card->dev,
"ASoC: failed to instantiate card %d\n",
@@ -1638,8 +1702,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
/* probe all DAI links on this card */
for (order = SND_SOC_COMP_ORDER_FIRST; order <= SND_SOC_COMP_ORDER_LAST;
order++) {
- for (i = 0; i < card->num_links; i++) {
- ret = soc_probe_link_dais(card, i, order);
+ list_for_each_entry(rtd, &card->rtd_list, list) {
+ ret = soc_probe_link_dais(card, rtd, order);
if (ret < 0) {
dev_err(card->dev,
"ASoC: failed to instantiate card %d\n",
@@ -1733,6 +1797,7 @@ card_probe_error:
snd_card_free(card->snd_card);
base_error:
+ soc_remove_pcm_runtimes(card);
mutex_unlock(&card->mutex);
mutex_unlock(&client_mutex);
@@ -1763,13 +1828,12 @@ static int soc_probe(struct platform_device *pdev)
static int soc_cleanup_card_resources(struct snd_soc_card *card)
{
+ struct snd_soc_pcm_runtime *rtd;
int i;
/* make sure any delayed work runs */
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_pcm_runtime *rtd = &card->rtd[i];
+ list_for_each_entry(rtd, &card->rtd_list, list)
flush_delayed_work(&rtd->delayed_work);
- }
/* remove auxiliary devices */
for (i = 0; i < card->num_aux_devs; i++)
@@ -1777,6 +1841,7 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
/* remove and free each DAI */
soc_remove_dai_links(card);
+ soc_remove_pcm_runtimes(card);
soc_cleanup_card_debugfs(card);
@@ -1803,29 +1868,26 @@ static int soc_remove(struct platform_device *pdev)
int snd_soc_poweroff(struct device *dev)
{
struct snd_soc_card *card = dev_get_drvdata(dev);
- int i;
+ struct snd_soc_pcm_runtime *rtd;
if (!card->instantiated)
return 0;
/* Flush out pmdown_time work - we actually do want to run it
* now, we're shutting down so no imminent restart. */
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_pcm_runtime *rtd = &card->rtd[i];
+ list_for_each_entry(rtd, &card->rtd_list, list)
flush_delayed_work(&rtd->delayed_work);
- }
snd_soc_dapm_shutdown(card);
/* deactivate pins to sleep state */
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_pcm_runtime *rtd = &card->rtd[i];
+ list_for_each_entry(rtd, &card->rtd_list, list) {
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
- int j;
+ int i;
pinctrl_pm_select_sleep_state(cpu_dai->dev);
- for (j = 0; j < rtd->num_codecs; j++) {
- struct snd_soc_dai *codec_dai = rtd->codec_dais[j];
+ for (i = 0; i < rtd->num_codecs; i++) {
+ struct snd_soc_dai *codec_dai = rtd->codec_dais[i];
pinctrl_pm_select_sleep_state(codec_dai->dev);
}
}
@@ -2337,6 +2399,7 @@ static int snd_soc_init_multicodec(struct snd_soc_card *card,
int snd_soc_register_card(struct snd_soc_card *card)
{
int i, j, ret;
+ struct snd_soc_pcm_runtime *rtd;
if (!card->name || !card->dev)
return -EINVAL;
@@ -2408,25 +2471,15 @@ int snd_soc_register_card(struct snd_soc_card *card)
snd_soc_initialize_card_lists(card);
- card->rtd = devm_kzalloc(card->dev,
+ INIT_LIST_HEAD(&card->rtd_list);
+ card->num_rtd = 0;
+
+ card->rtd_aux = devm_kzalloc(card->dev,
sizeof(struct snd_soc_pcm_runtime) *
- (card->num_links + card->num_aux_devs),
+ card->num_aux_devs,
GFP_KERNEL);
- if (card->rtd == NULL)
+ if (card->rtd_aux == NULL)
return -ENOMEM;
- card->num_rtd = 0;
- card->rtd_aux = &card->rtd[card->num_links];
-
- for (i = 0; i < card->num_links; i++) {
- card->rtd[i].card = card;
- card->rtd[i].dai_link = &card->dai_link[i];
- card->rtd[i].codec_dais = devm_kzalloc(card->dev,
- sizeof(struct snd_soc_dai *) *
- (card->rtd[i].dai_link->num_codecs),
- GFP_KERNEL);
- if (card->rtd[i].codec_dais == NULL)
- return -ENOMEM;
- }
for (i = 0; i < card->num_aux_devs; i++)
card->rtd_aux[i].card = card;
@@ -2442,8 +2495,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
return ret;
/* deactivate pins to sleep state */
- for (i = 0; i < card->num_rtd; i++) {
- struct snd_soc_pcm_runtime *rtd = &card->rtd[i];
+ list_for_each_entry(rtd, &card->rtd_list, list) {
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
int j;
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7482c5d..6d1f066 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3861,13 +3861,10 @@ static void soc_dapm_dai_stream_event(struct snd_soc_dai *dai, int stream,
void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card)
{
- struct snd_soc_pcm_runtime *rtd = card->rtd;
- int i;
+ struct snd_soc_pcm_runtime *rtd;
/* for each BE DAI link... */
- for (i = 0; i < card->num_rtd; i++) {
- rtd = &card->rtd[i];
-
+ list_for_each_entry(rtd, &card->rtd_list, list) {
/*
* dynamic FE links have no fixed DAI mapping.
* CODEC<->CODEC links have no direct connection.
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 70e4b9d..0246019 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1166,11 +1166,10 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
struct snd_soc_dapm_widget *widget, int stream)
{
struct snd_soc_pcm_runtime *be;
- int i, j;
+ int i;
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
- for (i = 0; i < card->num_links; i++) {
- be = &card->rtd[i];
+ list_for_each_entry(be, &card->rtd_list, list) {
if (!be->dai_link->no_pcm)
continue;
@@ -1178,16 +1177,15 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
if (be->cpu_dai->playback_widget == widget)
return be;
- for (j = 0; j < be->num_codecs; j++) {
- struct snd_soc_dai *dai = be->codec_dais[j];
+ for (i = 0; i < be->num_codecs; i++) {
+ struct snd_soc_dai *dai = be->codec_dais[i];
if (dai->playback_widget == widget)
return be;
}
}
} else {
- for (i = 0; i < card->num_links; i++) {
- be = &card->rtd[i];
+ list_for_each_entry(be, &card->rtd_list, list) {
if (!be->dai_link->no_pcm)
continue;
@@ -1195,8 +1193,8 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
if (be->cpu_dai->capture_widget == widget)
return be;
- for (j = 0; j < be->num_codecs; j++) {
- struct snd_soc_dai *dai = be->codec_dais[j];
+ for (i = 0; i < be->num_codecs; i++) {
+ struct snd_soc_dai *dai = be->codec_dais[i];
if (dai->capture_widget == widget)
return be;
}
@@ -2296,12 +2294,12 @@ static int dpcm_run_old_update(struct snd_soc_pcm_runtime *fe, int stream)
*/
int soc_dpcm_runtime_update(struct snd_soc_card *card)
{
- int i, old, new, paths;
+ struct snd_soc_pcm_runtime *fe;
+ int old, new, paths;
mutex_lock_nested(&card->mutex, SND_SOC_CARD_CLASS_RUNTIME);
- for (i = 0; i < card->num_rtd; i++) {
+ list_for_each_entry(fe, &card->rtd_list, list) {
struct snd_soc_dapm_widget_list *list;
- struct snd_soc_pcm_runtime *fe = &card->rtd[i];
/* make sure link is FE */
if (!fe->dai_link->dynamic)
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index 2160400..e485278 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -199,7 +199,8 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
static int tegra_wm8903_remove(struct snd_soc_card *card)
{
- struct snd_soc_pcm_runtime *rtd = &(card->rtd[0]);
+ struct snd_soc_pcm_runtime *rtd =
+ snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_codec *codec = codec_dai->codec;
struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
--
1.9.1
1
0
08 Aug '15
>>>> >> >
>>>> >> > sl@max:~$ lspci -nnk | grep -iA2 audio
>>>> >> > 00:1b.0 Audio device [0403]: Intel Corporation
82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller
[8086:2668] (rev 04)
>>>> >> > Subsystem: QUANTA Computer Inc Device [152d:0748]
>>>> >> > Kernel driver in use: snd_hda_intel
>>>> >> >
>>>> >> > sl@max:~$ aplay -l
>>>> >> > **** Liste der Hardware-Geräte (PLAYBACK) ****
>>>> >> > Karte 0: Intel [HDA Intel], Gerät 6: Si3054 Modem [Si3054 Modem]
>>>> >> > Sub-Geräte: 1/1
>>>> >> > Sub-Gerät #0: subdevice #0
>>>> >> >
>>>> >>
>>>> >>
https://lists.fedoraproject.org/pipermail/test/2014-November/123662.html
>>>> >>
>>>> >> If bios did not setup pin default of alc880 codec, you need to find
out the pin of hp and mic jacks by hdajacksensetest , speaker and internal
mic need to find out by trial and err with hdajackretask
>>>> >>
>>>> >
>>>> > This is the output of hda-jack-sense-test. What do you recommend?
>>>> >
>>>> > root@max:~# hda-jack-sense-test
>>>> > Pin 0x14 (Unknown Line Out): present = No
>>>> > Pin 0x15 (Unknown Line Out): present = No
>>>> > Pin 0x16 (Unknown Line Out): present = No
>>>> > Pin 0x17 (Unknown Line Out): present = No
>>>> > Pin 0x18 (Unknown Line Out): present = No
>>>> > Pin 0x19 (Unknown Line Out): present = No
>>>> > Pin 0x1a (Unknown Line Out): present = No
>>>> > Pin 0x1b (Unknown Line Out): present = No
>>>> > Pin 0x1c (Unknown Line Out): present = No
>>>> > Pin 0x1d (Unknown Line Out): present = No
>>>> > Pin 0x1e (Unknown Line Out): present = No
>>>> > Pin 0x1f (Unknown Line Out): present = No
>>>> >
>>>>
>>>> Post the output of alsa-info.sh
>>>>
>>>> You have to use
>>>>
>>>> hdajacksensetest -a
>>>
>>> It gives the same output.
>>>>
>>>> Did you plug and unplug headphone or mic jack during test ?
>>>
>>> No.
>>
>> you have to post output of
>>
>> hdajacksensetest -a
>>
>> when you plug headphone , unplug headphone , plug mic and unplug mic
>>
>>
>>
>>>>
>>>> Since pin default of all pin complex are zero which is Line Out
>>>
>>> It is a laptop. I want to use its internal speakers, if that info helps.
>>
>> All pins have to be fixed by hdajackretask
>>
>> !!Sysfs Files
>> !!-----------
>>
>> /sys/class/sound/hwC0D0/init_pin_configs:
>> 0x14 0x00000000
>> 0x15 0x00000000
>> 0x16 0x00000000
>> 0x17 0x00000000
>> 0x18 0x00000000
>> 0x19 0x00000000
>> 0x1a 0x00000000
>> 0x1b 0x00000000
>> 0x1c 0x00000000
>> 0x1d 0x00000000
>> 0x1e 0x01000000
>> 0x1f 0x00000000
>>
>>
>>>>
>>>> Any redundant pins must set to [N/A]
>>>>
>>>> alc880 only have models for desktop
>>>>
>>>>
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documenta…
>>>>
>>>>
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/pci/…
>>>
>>>
>>
>>
>> In the past, there was a "test" model which setup all pins
>>
>>
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/p…
>>
>> you can try
>>
>> options snd-hda-intel model=6stack-dig
>>
>> to find out whether the speaker is node 0x14 and Headphone and 0x1b
>> you have to manually find front mic, rear mic and line in is your laptop
internal mic and mic jacks
>>
>>
>> Do windows driver contain info about the pins since it also need to
setup the pin complex too ?
>>
>>
>>
>> sl@max:~$ cat /tmp/alsa-info.txt.5lh8RkGutE
>> upload=true&script=true&cardinfo=
>> !!################################
>> !!ALSA Information Script v 0.4.64
>> !!################################
>>
>> !!Script ran on: Fri Aug 7 11:57:07 UTC 2015
>>
>>
>> !!Linux Distribution
>> !!------------------
>>
>> Ubuntu 14.04.3 LTS \n \l DISTRIB_ID=Ubuntu DISTRIB_DESCRIPTION="Ubuntu
14.04.3 LTS" NAME="Ubuntu" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu
14.04.3 LTS" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="
http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
>>
>>
>> !!DMI Information
>> !!---------------
>>
>> Manufacturer: MAXDATA
>> Product Name: PRO8100IS58
>> Product Version: 5123660003
>> Firmware Version: M3B61
>>
>>
>> !!Kernel Information
>> !!------------------
>>
>> Kernel release: 3.16.0-45-generic
>> Operating System: GNU/Linux
>> Architecture: i686
>> Processor: i686
>> SMP Enabled: Yes
>>
>>
>> !!ALSA Version
>> !!------------
>>
>> Driver version: k3.16.0-45-generic
>> Library version: 1.0.27.2
>> Utilities version: 1.0.27.2
>>
>>
>> !!Loaded ALSA modules
>> !!-------------------
>>
>> snd_hda_intel
>>
>>
>> !!Sound Servers on this system
>> !!----------------------------
>>
>> Pulseaudio:
>> Installed - Yes (/usr/bin/pulseaudio)
>> Running - Yes
>>
>>
>> !!Soundcards recognised by ALSA
>> !!-----------------------------
>>
>> 0 [Intel ]: HDA-Intel - HDA Intel
>> HDA Intel at 0xc0000000 irq 46
>>
>>
>> !!PCI Soundcards installed in the system
>> !!--------------------------------------
>>
>> 00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) High Definition Audio Controller (rev 04)
>>
>>
>> !!Advanced information - PCI Vendor/Device/Subsystem ID's
>> !!-------------------------------------------------------
>>
>> 00:1b.0 0403: 8086:2668 (rev 04)
>> Subsystem: 152d:0748
>> --
>> Prefetchable memory behind bridge: 0000000040000000-00000000401fffff
>> Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
>>
>>
>>
>>
>> !!HDA-Intel Codec information
>> !!---------------------------
>> --startcollapse--
>>
>> Codec: Realtek ALC880
>> Address: 0
>> AFG Function Id: 0x1 (unsol 0)
>> Vendor Id: 0x10ec0880
>> Subsystem Id: 0x08800000
>> Revision Id: 0x100800
>> No Modem Function Group found
>> Default PCM:
>> rates [0x560]: 44100 48000 96000 192000
>> bits [0xe]: 16 20 24
>> formats [0x1]: PCM
>> Default Amp-In caps: N/A
>> Default Amp-Out caps: N/A
>> State of AFG node 0x01:
>> Power states: D0 D1 D2 D3
>> Power: setting=D0, actual=D0
>> GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
>> IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
>> IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
>> Node 0x02 [Audio Output] wcaps 0x411: Stereo
>> Converter: stream=0, channel=0
>> PCM:
>> rates [0x560]: 44100 48000 96000 192000
>> bits [0xe]: 16 20 24
>> formats [0x1]: PCM
>> Power states: D0 D1 D2 D3
>> Power: setting=D0, actual=D0
>> Node 0x03 [Audio Output] wcaps 0x411: Stereo
>> Converter: stream=0, channel=0
>> PCM:
>> rates [0x560]: 44100 48000 96000 192000
>> bits [0xe]: 16 20 24
>> formats [0x1]: PCM
>> Power states: D0 D1 D2 D3
>> Power: setting=D0, actual=D0
>> Node 0x04 [Audio Output] wcaps 0x411: Stereo
>> Converter: stream=0, channel=0
>> PCM:
>> rates [0x160]: 44100 48000 96000
>> bits [0xe]: 16 20 24
>> formats [0x1]: PCM
>> Power states: D0 D1 D2 D3
>> Power: setting=D0, actual=D0
>> Node 0x05 [Audio Output] wcaps 0x411: Stereo
>> Converter: stream=0, channel=0
>> PCM:
>> rates [0x160]: 44100 48000 96000
>> bits [0xe]: 16 20 24
>> formats [0x1]: PCM
>> Power states: D0 D1 D2 D3
>> Power: setting=D0, actual=D0
>> Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
>> Converter: stream=0, channel=0
>> Digital:
>> Digital category: 0x0
>> IEC Coding Type: 0x0
>> PCM:
>> rates [0x160]: 44100 48000 96000
>> bits [0x1e]: 16 20 24 32
>> formats [0x1]: PCM
>> Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In
>> Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
>> Amp-In vals: [0x00 0x00]
>> Converter: stream=0, channel=0
>> SDI-Select: 0
>> PCM:
>> rates [0x160]: 44100 48000 96000
>> bits [0x6]: 16 20
>> formats [0x1]: PCM
>> Power states: D0 D1 D2 D3
>> Power: setting=D0, actual=D0
>> Connection: 7
>> 0x18* 0x19 0x1a 0x1b 0x1c 0x14 0x15
>> Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
>> Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
>> Amp-In vals: [0x00 0x00]
>> Converter: stream=0, channel=0
>> SDI-Select: 0
>> PCM:
>> rates [0x160]: 44100 48000 96000
>> bits [0x6]: 16 20
>> formats [0x1]: PCM
>> Power states: D0 D1 D2 D3
>> Power: setting=D0, actual=D0
>> Connection: 7
>> 0x18 0x19 0x1a* 0x1b 0x1c 0x14 0x15
>> Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
>> Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
>> Amp-In vals: [0x00 0x00]
>> Converter: stream=0, channel=0
>> SDI-Select: 0
>> PCM:
>> rates [0x160]: 44100 48000 96000
>> bits [0x6]: 16 20
>> formats [0x1]: PCM
>> Power states: D0 D1 D2 D3
>> Power: setting=D0, actual=D0
>> Connection: 10
>> 0x18 0x19 0x1a 0x1b 0x1c* 0x0b 0x14 0x15 0x16 0x17
>> Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
>> Converter: stream=0, channel=0
>> SDI-Select: 0
>> Digital:
>> Digital category: 0x0
>> IEC Coding Type: 0x0
>> PCM:
>> rates [0x160]: 44100 48000 96000
>> bits [0x1e]: 16 20 24 32
>> formats [0x1]: PCM
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x1f
>> Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
>> Control: name="Beep Playback Volume", index=0, device=0
>> ControlAmp: chs=3, dir=In, idx=5, ofs=0
>> Control: name="Beep Playback Switch", index=0, device=0
>> ControlAmp: chs=3, dir=In, idx=5, ofs=0
>> Amp-In caps: ofs=0x23, nsteps=0x41, stepsize=0x03, mute=1
>> Amp-In vals: [0xa3 0xa3] [0xa3 0xa3] [0xa3 0xa3] [0xa3 0xa3] [0xa3
0xa3] [0x80 0x80] [0xa3 0xa3] [0xa3 0xa3]
>> Connection: 8
>> 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15
>> Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
>> Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-In vals: [0x00 0x00] [0x80 0x80]
>> Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
>> Amp-Out vals: [0x40 0x40]
>> Connection: 2
>> 0x02 0x0b
>> Node 0x0d [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
>> Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-In vals: [0x00 0x00] [0x80 0x80]
>> Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
>> Amp-Out vals: [0x40 0x40]
>> Connection: 2
>> 0x03 0x0b
>> Node 0x0e [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
>> Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-In vals: [0x00 0x00] [0x80 0x80]
>> Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
>> Amp-Out vals: [0x40 0x40]
>> Connection: 2
>> 0x04 0x0b
>> Node 0x0f [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
>> Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-In vals: [0x00 0x00] [0x80 0x80]
>> Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
>> Amp-Out vals: [0x40 0x40]
>> Connection: 2
>> 0x05 0x0b
>> Node 0x10 [Audio Selector] wcaps 0x300101: Stereo
>> Connection: 4
>> 0x0c* 0x0d 0x0e 0x0f
>> Node 0x11 [Audio Selector] wcaps 0x300101: Stereo
>> Connection: 4
>> 0x0c* 0x0d 0x0e 0x0f
>> Node 0x12 [Audio Selector] wcaps 0x300101: Stereo
>> Connection: 4
>> 0x0c* 0x0d 0x0e 0x0f
>> Node 0x13 [Audio Selector] wcaps 0x300101: Stereo
>> Connection: 4
>> 0x0c* 0x0d 0x0e 0x0f
>> Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
>> Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-Out vals: [0x80 0x80]
>> Pincap 0x0000003f: IN OUT HP Detect Trigger ImpSense
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x20: IN
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x0c
>> Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
>> Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-Out vals: [0x80 0x80]
>> Pincap 0x0000003f: IN OUT HP Detect Trigger ImpSense
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x20: IN
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x0d
>> Node 0x16 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
>> Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-Out vals: [0x80 0x80]
>> Pincap 0x0000003f: IN OUT HP Detect Trigger ImpSense
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x20: IN
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x0e
>> Node 0x17 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
>> Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-Out vals: [0x80 0x80]
>> Pincap 0x0000003f: IN OUT HP Detect Trigger ImpSense
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x20: IN
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x0f
>> Node 0x18 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
>> Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-Out vals: [0x80 0x80]
>> Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
>> Vref caps: HIZ 50 80
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x21: IN VREF_50
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x10
>> Node 0x19 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
>> Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-Out vals: [0x80 0x80]
>> Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
>> Vref caps: HIZ 50 80
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x20: IN VREF_HIZ
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x11
>> Node 0x1a [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
>> Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-Out vals: [0x80 0x80]
>> Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
>> Vref caps: HIZ 50 80
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x20: IN VREF_HIZ
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x12
>> Node 0x1b [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
>> Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
>> Amp-Out vals: [0x80 0x80]
>> Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
>> Vref caps: HIZ 50 80
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x20: IN VREF_HIZ
>> Unsolicited: tag=00, enabled=0
>> Connection: 1
>> 0x13
>> Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
>> Pincap 0x00000020: IN
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x00:
>> Node 0x1d [Pin Complex] wcaps 0x400000: Mono
>> Pincap 0x00000020: IN
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x00:
>> Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital
>> Control: name="Line Out Phantom Jack", index=0, device=0
>> Pincap 0x00000010: OUT
>> Pin Default 0x01000000: [Jack] Line Out at Ext Rear
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x00:
>> Connection: 1
>> 0x06
>> Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital
>> Pincap 0x00000020: IN
>> Pin Default 0x00000000: [Jack] Line Out at Ext N/A
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x00:
>> Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
>> Processing caps: benign=0, ncoeff=10
>> Node 0x21 [Volume Knob Widget] wcaps 0x600080: Mono
>> Volume-Knob: delta=0, steps=64, direct=0, val=25
>> Unsolicited: tag=00, enabled=0
>> Connection: 0
>> Codec: Motorola Si3054
>> Address: 1
>> MFG Function Id: 0x2 (unsol 1)
>> Vendor Id: 0x10573055
>> Subsystem Id: 0x10573055
>> Revision Id: 0x100700
>> Modem Function Group: 0x1
>> --endcollapse--
>>
>>
>> !!ALSA Device nodes
>> !!-----------------
>>
>> crw-rw----+ 1 root audio 116, 2 Aug 7 12:03 /dev/snd/controlC0
>> crw-rw----+ 1 root audio 116, 5 Aug 7 12:03 /dev/snd/hwC0D0
>> crw-rw----+ 1 root audio 116, 6 Aug 7 12:03 /dev/snd/hwC0D1
>> crw-rw----+ 1 root audio 116, 4 Aug 7 12:03 /dev/snd/pcmC0D6c
>> crw-rw----+ 1 root audio 116, 3 Aug 7 12:03 /dev/snd/pcmC0D6p
>> crw-rw----+ 1 root audio 116, 1 Aug 7 12:03 /dev/snd/seq
>> crw-rw----+ 1 root audio 116, 33 Aug 7 12:03 /dev/snd/timer
>>
>> /dev/snd/by-path:
>> total 0
>> drwxr-xr-x 2 root root 60 Aug 7 12:03 .
>> drwxr-xr-x 3 root root 200 Aug 7 12:03 ..
>> lrwxrwxrwx 1 root root 12 Aug 7 12:03 pci-0000:00:1b.0 -> ../controlC0
>>
>>
>> !!Aplay/Arecord output
>> !!--------------------
>>
>> APLAY
>>
>> **** List of PLAYBACK Hardware Devices ****
>> card 0: Intel [HDA Intel], device 6: Si3054 Modem [Si3054 Modem]
>> Subdevices: 1/1
>> Subdevice #0: subdevice #0
>>
>> ARECORD
>>
>> **** List of CAPTURE Hardware Devices ****
>> card 0: Intel [HDA Intel], device 6: Si3054 Modem [Si3054 Modem]
>> Subdevices: 1/1
>> Subdevice #0: subdevice #0
>>
>> !!Amixer output
>> !!-------------
>>
>> !!-------Mixer controls for card 0 [Intel]
>>
>> Card hw:0 'Intel'/'HDA Intel at 0xc0000000 irq 46'
>> Mixer name : 'Realtek ALC880'
>> Components : 'HDA:10ec0880,08800000,00100800
HDA:10573055,10573055,00100700'
>> Controls : 8
>> Simple ctrls : 4
>> Simple mixer control 'PCM',0
>> Capabilities: pvolume
>> Playback channels: Front Left - Front Right
>> Limits: Playback 0 - 255
>> Mono:
>> Front Left: Playback 255 [100%] [0.00dB]
>> Front Right: Playback 255 [100%] [0.00dB]
>> Simple mixer control 'Beep',0
>> Capabilities: pvolume pswitch
>> Playback channels: Front Left - Front Right
>> Limits: Playback 0 - 65
>> Mono:
>> Front Left: Playback 0 [0%] [-35.00dB] [off]
>> Front Right: Playback 0 [0%] [-35.00dB] [off]
>> Simple mixer control 'Caller ID',0
>> Capabilities: pswitch pswitch-joined
>> Playback channels: Mono
>> Mono: Playback [off]
>> Simple mixer control 'Off-hook',0
>> Capabilities: pswitch pswitch-joined
>> Playback channels: Mono
>> Mono: Playback [off]
>>
>>
>> !!Alsactl output
>> !!--------------
>>
>> --startcollapse--
>> state.Intel {
>> control.1 {
>> iface CARD
>> name 'Line Out Phantom Jack'
>> value true
>> comment {
>> access read
>> type BOOLEAN
>> count 1
>> }
>> }
>> control.2 {
>> iface MIXER
>> name 'Beep Playback Volume'
>> value.0 0
>> value.1 0
>> comment {
>> access 'read write'
>> type INTEGER
>> count 2
>> range '0 - 65'
>> dbmin -3500
>> dbmax 3000
>> dbvalue.0 -3500
>> dbvalue.1 -3500
>> }
>> }
>> control.3 {
>> iface MIXER
>> name 'Beep Playback Switch'
>> value.0 false
>> value.1 false
>> comment {
>> access 'read write'
>> type BOOLEAN
>> count 2
>> }
>> }
>> control.4 {
>> iface MIXER
>> name 'Off-hook Switch'
>> value false
>> comment {
>> access 'read write'
>> type BOOLEAN
>> count 1
>> }
>> }
>> control.5 {
>> iface MIXER
>> name 'Caller ID Switch'
>> value false
>> comment {
>> access 'read write'
>> type BOOLEAN
>> count 1
>> }
>> }
>> control.6 {
>> iface PCM
>> device 6
>> name 'Playback Channel Map'
>> value 0
>> comment {
>> access read
>> type INTEGER
>> count 1
>> range '0 - 36'
>> }
>> }
>> control.7 {
>> iface PCM
>> device 6
>> name 'Capture Channel Map'
>> value 0
>> comment {
>> access read
>> type INTEGER
>> count 1
>> range '0 - 36'
>> }
>> }
>> control.8 {
>> iface MIXER
>> name 'PCM Playback Volume'
>> value.0 255
>> value.1 255
>> comment {
>> access 'read write user'
>> type INTEGER
>> count 2
>> range '0 - 255'
>> tlv '0000000100000008ffffec1400000014'
>> dbmin -5100
>> dbmax 0
>> dbvalue.0 0
>> dbvalue.1 0
>> }
>> }
>> }
>> --endcollapse--
>>
>>
>>
>>
>> !!Sysfs Files
>> !!-----------
>>
>> /sys/class/sound/hwC0D0/init_pin_configs:
>> 0x14 0x00000000
>> 0x15 0x00000000
>> 0x16 0x00000000
>> 0x17 0x00000000
>> 0x18 0x00000000
>> 0x19 0x00000000
>> 0x1a 0x00000000
>> 0x1b 0x00000000
>> 0x1c 0x00000000
>> 0x1d 0x00000000
>> 0x1e 0x01000000
>> 0x1f 0x00000000
>>
>> /sys/class/sound/hwC0D0/driver_pin_configs:
>>
>> /sys/class/sound/hwC0D0/user_pin_configs:
>>
>> /sys/class/sound/hwC0D0/init_verbs:
>>
>> /sys/class/sound/hwC0D0/hints:
>>
>> /sys/class/sound/hwC0D1/init_pin_configs:
>>
>> /sys/class/sound/hwC0D1/driver_pin_configs:
>>
>> /sys/class/sound/hwC0D1/user_pin_configs:
>>
>> /sys/class/sound/hwC0D1/init_verbs:
>>
>> /sys/class/sound/hwC0D1/hints:
>>
>>
>> !!ALSA/HDA dmesg
>> !!--------------
>>
>> [ 29.335966] ipw2200: Detected geography ZZE (13 802.11bg channels, 19
802.11a channels)
>> [ 29.378618] snd_hda_intel 0000:00:1b.0: irq 46 for MSI/MSI-X
>> [ 29.673379] sound hdaudioC0D0: autoconfig: line_outs=0
(0x0/0x0/0x0/0x0/0x0) type:line
>> [ 29.673387] sound hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
>> [ 29.673390] sound hdaudioC0D0: hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
>> [ 29.673393] sound hdaudioC0D0: mono: mono_out=0x1e
>> [ 29.673396] sound hdaudioC0D0: inputs:
>> [ 30.010420] Bluetooth: RFCOMM TTY layer initialized
>>
>>
>>
>
>
> After figuring out what lines are used for which device, I was able
> to set config. Now it is working.
>
Can you post out the correct pin config for your laptop ?
Do auto mute and auto mic selection work as expected ?
Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital
>> Control: name="Line Out Phantom Jack", index=0, device=0
>> Pincap 0x00000010: OUT
>> Pin Default 0x01000000: [Jack] Line Out at Ext Rear
>> Conn = Unknown, Color = Unknown
>> DefAssociation = 0x0, Sequence = 0x0
>> Pin-ctls: 0x00:
>> Connection: 1
>> 0x06
There is a bug in hda_auto_parser which treat invalid digital out pin as
mono out(line out) and create Line Out Phantom Jack
1
0
[alsa-devel] [PATCH] topology: treat all DAPM controls types the same when copying
by Liam Girdwood 07 Aug '15
by Liam Girdwood 07 Aug '15
07 Aug '15
From: Mengdong Lin <mengdong.lin(a)intel.com>
Copy all DAPM controls types using the same method.
Signed-off-by: Mengdong Lin <mengdong.lin(a)intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com>
---
src/topology/dapm.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/topology/dapm.c b/src/topology/dapm.c
index 7e26ea0..a0a8b86 100644
--- a/src/topology/dapm.c
+++ b/src/topology/dapm.c
@@ -107,8 +107,6 @@ static int tplg_parse_dapm_enums(snd_config_t *cfg, struct tplg_elem *elem)
static int copy_dapm_control(struct tplg_elem *elem, struct tplg_elem *ref)
{
struct snd_soc_tplg_dapm_widget *widget = elem->widget;
- struct snd_soc_tplg_mixer_control *mixer_ctrl = ref->mixer_ctrl;
- struct snd_soc_tplg_enum_control *enum_ctrl = ref->enum_ctrl;
tplg_dbg("Control '%s' used by '%s'\n", ref->id, elem->id);
tplg_dbg("\tparent size: %d + %d -> %d, priv size -> %d\n",
@@ -121,13 +119,10 @@ static int copy_dapm_control(struct tplg_elem *elem, struct tplg_elem *ref)
elem->widget = widget;
- /* copy new widget at the end */
- if (ref->type == OBJECT_TYPE_MIXER)
- memcpy((void*)widget + elem->size, mixer_ctrl, ref->size);
- else if (ref->type == OBJECT_TYPE_ENUM)
- memcpy((void*)widget + elem->size, enum_ctrl, ref->size);
-
+ /* append the control to the end of the widget */
+ memcpy((void*)widget + elem->size, ref->obj, ref->size);
elem->size += ref->size;
+
widget->num_kcontrols++;
ref->compound_elem = 1;
return 0;
--
2.1.4
2
3
07 Aug '15
This series updates the topology UAPI to allow easier addition of new TLV
object types and generic operations for alsa-lib.
Mengdong Lin (2):
topology: update ABI to improve support for different TLV object
types.
topology: Add ops support to byte control objects.
include/sound/asoc.h | 28 +++++++++++++++++++---------
src/topology/ctl.c | 20 ++++++++------------
2 files changed, 27 insertions(+), 21 deletions(-)
--
2.1.4
2
3
>
> >>
> >> >
> >> > I tried a lot already. No success to get the sound working on my old
> maxdata laptop.
> >> > This is what I got:
> >> >
> >> > sl@max:~$ lspci -nnk | grep -iA2 audio
> >> > 00:1b.0 Audio device [0403]: Intel Corporation 82801FB/FBM/FR/FW/FRW
> (ICH6 Family) High Definition Audio Controller [8086:2668] (rev 04)
> >> > Subsystem: QUANTA Computer Inc Device [152d:0748]
> >> > Kernel driver in use: snd_hda_intel
> >> >
> >> > sl@max:~$ aplay -l
> >> > **** Liste der Hardware-Geräte (PLAYBACK) ****
> >> > Karte 0: Intel [HDA Intel], Gerät 6: Si3054 Modem [Si3054 Modem]
> >> > Sub-Geräte: 1/1
> >> > Sub-Gerät #0: subdevice #0
> >> >
> >> > sl@max:~$ aplay /usr/share/sounds/alsa/Front_Center.wav
> >> > Wiedergabe: WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed
> 16 bit Little Endian, Rate: 48000 Hz, mono
> >> >
> >> > Please let me know if/what further information I should provide to
> give you a better understanding in what is wrong.
> >> >
> >>
> >>
> https://lists.fedoraproject.org/pipermail/test/2014-November/123662.html
> >>
> >> If bios did not setup pin default of alc880 codec, you need to find out
> the pin of hp and mic jacks by hdajacksensetest , speaker and internal mic
> need to find out by trial and err with hdajackretask
> >>
> >> _______________________________________________
> >> pulseaudio-discuss mailing list
> >> pulseaudio-discuss(a)lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> >
> > This is the output of hda-jack-sense-test. What do you recommend?
> >
> > root@max:~# hda-jack-sense-test
> > Pin 0x14 (Unknown Line Out): present = No
> > Pin 0x15 (Unknown Line Out): present = No
> > Pin 0x16 (Unknown Line Out): present = No
> > Pin 0x17 (Unknown Line Out): present = No
> > Pin 0x18 (Unknown Line Out): present = No
> > Pin 0x19 (Unknown Line Out): present = No
> > Pin 0x1a (Unknown Line Out): present = No
> > Pin 0x1b (Unknown Line Out): present = No
> > Pin 0x1c (Unknown Line Out): present = No
> > Pin 0x1d (Unknown Line Out): present = No
> > Pin 0x1e (Unknown Line Out): present = No
> > Pin 0x1f (Unknown Line Out): present = No
> >
>
> Post the output of alsa-info.sh
>
> You have to use
>
> hdajacksensetest -a
>
> It gives the same output.
>
> Did you plug and unplug headphone or mic jack during test ?
>
> No.
>
you have to post output of
hdajacksensetest -a
when you plug headphone , unplug headphone , plug mic and unplug mic
>
> Since pin default of all pin complex are zero which is Line Out
>
> It is a laptop. I want to use its internal speakers, if that info helps.
>
All pins have to be fixed by hdajackretask
!!Sysfs Files
!!-----------
/sys/class/sound/hwC0D0/init_pin_configs:
0x14 0x00000000
0x15 0x00000000
0x16 0x00000000
0x17 0x00000000
0x18 0x00000000
0x19 0x00000000
0x1a 0x00000000
0x1b 0x00000000
0x1c 0x00000000
0x1d 0x00000000
0x1e 0x01000000
0x1f 0x00000000
> Any redundant pins must set to [N/A]
>
> alc880 only have models for desktop
>
>
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documenta…
>
>
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/pci/…
>
>
>
In the past, there was a "test" model which setup all pins
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/p…
you can try
options snd-hda-intel model=6stack-dig
to find out whether the speaker is node 0x14 and Headphone and 0x1b
you have to manually find front mic, rear mic and line in is your laptop
internal mic and mic jacks
Do windows driver contain info about the pins since it also need to setup
the pin complex too ?
sl@max:~$ cat /tmp/alsa-info.txt.5lh8RkGutE
upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.64
!!################################
!!Script ran on: Fri Aug 7 11:57:07 UTC 2015
!!Linux Distribution
!!------------------
Ubuntu 14.04.3 LTS \n \l DISTRIB_ID=Ubuntu DISTRIB_DESCRIPTION="Ubuntu
14.04.3 LTS" NAME="Ubuntu" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu
14.04.3 LTS" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="
http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
!!DMI Information
!!---------------
Manufacturer: MAXDATA
Product Name: PRO8100IS58
Product Version: 5123660003
Firmware Version: M3B61
!!Kernel Information
!!------------------
Kernel release: 3.16.0-45-generic
Operating System: GNU/Linux
Architecture: i686
Processor: i686
SMP Enabled: Yes
!!ALSA Version
!!------------
Driver version: k3.16.0-45-generic
Library version: 1.0.27.2
Utilities version: 1.0.27.2
!!Loaded ALSA modules
!!-------------------
snd_hda_intel
!!Sound Servers on this system
!!----------------------------
Pulseaudio:
Installed - Yes (/usr/bin/pulseaudio)
Running - Yes
!!Soundcards recognised by ALSA
!!-----------------------------
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xc0000000 irq 46
!!PCI Soundcards installed in the system
!!--------------------------------------
00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family)
High Definition Audio Controller (rev 04)
!!Advanced information - PCI Vendor/Device/Subsystem ID's
!!-------------------------------------------------------
00:1b.0 0403: 8086:2668 (rev 04)
Subsystem: 152d:0748
--
Prefetchable memory behind bridge: 0000000040000000-00000000401fffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- <SERR- <PERR-
!!Modprobe options (Sound related)
!!--------------------------------
snd_atiixp_modem: index=-2
snd_intel8x0m: index=-2
snd_via82xx_modem: index=-2
snd_usb_audio: index=-2
snd_usb_caiaq: index=-2
snd_usb_ua101: index=-2
snd_usb_us122l: index=-2
snd_usb_usx2y: index=-2
snd_cmipci: mpu_port=0x330 fm_port=0x388
snd_pcsp: index=-2
snd_usb_audio: index=-2
!!Loaded sound module options
!!---------------------------
!!Module: snd_hda_intel
align_buffer_size : -1
bdl_pos_adj :
1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
beep_mode :
N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N
enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
enable_msi : -1
id :
(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
index :
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
jackpoll_ms :
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
model :
(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
patch :
(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
position_fix :
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
power_save : 0
power_save_controller : Y
probe_mask :
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
probe_only :
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
single_cmd : N
snoop : Y
!!HDA-Intel Codec information
!!---------------------------
--startcollapse--
Codec: Realtek ALC880
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x10ec0880
Subsystem Id: 0x08800000
Revision Id: 0x100800
No Modem Function Group found
Default PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x411: Stereo
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x411: Stereo
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x411: Stereo
Converter: stream=0, channel=0
PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Node 0x05 [Audio Output] wcaps 0x411: Stereo
Converter: stream=0, channel=0
PCM:
rates [0x160]: 44100 48000 96000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Node 0x07 [Audio Input] wcaps 0x10051b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
Amp-In vals: [0x00 0x00]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 7
0x18* 0x19 0x1a 0x1b 0x1c 0x14 0x15
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
Amp-In vals: [0x00 0x00]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 7
0x18 0x19 0x1a* 0x1b 0x1c 0x14 0x15
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
Amp-In vals: [0x00 0x00]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
Connection: 10
0x18 0x19 0x1a 0x1b 0x1c* 0x0b 0x14 0x15 0x16 0x17
Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
Converter: stream=0, channel=0
SDI-Select: 0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Unsolicited: tag=00, enabled=0
Connection: 1
0x1f
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Control: name="Beep Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=5, ofs=0
Control: name="Beep Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=5, ofs=0
Amp-In caps: ofs=0x23, nsteps=0x41, stepsize=0x03, mute=1
Amp-In vals: [0xa3 0xa3] [0xa3 0xa3] [0xa3 0xa3] [0xa3 0xa3] [0xa3 0xa3]
[0x80 0x80] [0xa3 0xa3] [0xa3 0xa3]
Connection: 8
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15
Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Connection: 2
0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Connection: 2
0x03 0x0b
Node 0x0e [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Connection: 2
0x04 0x0b
Node 0x0f [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Connection: 2
0x05 0x0b
Node 0x10 [Audio Selector] wcaps 0x300101: Stereo
Connection: 4
0x0c* 0x0d 0x0e 0x0f
Node 0x11 [Audio Selector] wcaps 0x300101: Stereo
Connection: 4
0x0c* 0x0d 0x0e 0x0f
Node 0x12 [Audio Selector] wcaps 0x300101: Stereo
Connection: 4
0x0c* 0x0d 0x0e 0x0f
Node 0x13 [Audio Selector] wcaps 0x300101: Stereo
Connection: 4
0x0c* 0x0d 0x0e 0x0f
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000003f: IN OUT HP Detect Trigger ImpSense
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Connection: 1
0x0c
Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000003f: IN OUT HP Detect Trigger ImpSense
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Connection: 1
0x0d
Node 0x16 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000003f: IN OUT HP Detect Trigger ImpSense
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Connection: 1
0x0e
Node 0x17 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000003f: IN OUT HP Detect Trigger ImpSense
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Connection: 1
0x0f
Node 0x18 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x21: IN VREF_50
Unsolicited: tag=00, enabled=0
Connection: 1
0x10
Node 0x19 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x20: IN VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x11
Node 0x1a [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x20: IN VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x12
Node 0x1b [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x20: IN VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x13
Node 0x1c [Pin Complex] wcaps 0x400001: Stereo
Pincap 0x00000020: IN
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x00:
Node 0x1d [Pin Complex] wcaps 0x400000: Mono
Pincap 0x00000020: IN
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x00:
Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital
Control: name="Line Out Phantom Jack", index=0, device=0
Pincap 0x00000010: OUT
Pin Default 0x01000000: [Jack] Line Out at Ext Rear
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x00:
Connection: 1
0x06
Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital
Pincap 0x00000020: IN
Pin Default 0x00000000: [Jack] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x0, Sequence = 0x0
Pin-ctls: 0x00:
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
Processing caps: benign=0, ncoeff=10
Node 0x21 [Volume Knob Widget] wcaps 0x600080: Mono
Volume-Knob: delta=0, steps=64, direct=0, val=25
Unsolicited: tag=00, enabled=0
Connection: 0
Codec: Motorola Si3054
Address: 1
MFG Function Id: 0x2 (unsol 1)
Vendor Id: 0x10573055
Subsystem Id: 0x10573055
Revision Id: 0x100700
Modem Function Group: 0x1
--endcollapse--
!!ALSA Device nodes
!!-----------------
crw-rw----+ 1 root audio 116, 2 Aug 7 12:03 /dev/snd/controlC0
crw-rw----+ 1 root audio 116, 5 Aug 7 12:03 /dev/snd/hwC0D0
crw-rw----+ 1 root audio 116, 6 Aug 7 12:03 /dev/snd/hwC0D1
crw-rw----+ 1 root audio 116, 4 Aug 7 12:03 /dev/snd/pcmC0D6c
crw-rw----+ 1 root audio 116, 3 Aug 7 12:03 /dev/snd/pcmC0D6p
crw-rw----+ 1 root audio 116, 1 Aug 7 12:03 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33 Aug 7 12:03 /dev/snd/timer
/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root 60 Aug 7 12:03 .
drwxr-xr-x 3 root root 200 Aug 7 12:03 ..
lrwxrwxrwx 1 root root 12 Aug 7 12:03 pci-0000:00:1b.0 -> ../controlC0
!!Aplay/Arecord output
!!--------------------
APLAY
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 6: Si3054 Modem [Si3054 Modem]
Subdevices: 1/1
Subdevice #0: subdevice #0
ARECORD
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 6: Si3054 Modem [Si3054 Modem]
Subdevices: 1/1
Subdevice #0: subdevice #0
!!Amixer output
!!-------------
!!-------Mixer controls for card 0 [Intel]
Card hw:0 'Intel'/'HDA Intel at 0xc0000000 irq 46'
Mixer name : 'Realtek ALC880'
Components : 'HDA:10ec0880,08800000,00100800
HDA:10573055,10573055,00100700'
Controls : 8
Simple ctrls : 4
Simple mixer control 'PCM',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 255 [100%] [0.00dB]
Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Beep',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65
Mono:
Front Left: Playback 0 [0%] [-35.00dB] [off]
Front Right: Playback 0 [0%] [-35.00dB] [off]
Simple mixer control 'Caller ID',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Off-hook',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
!!Alsactl output
!!--------------
--startcollapse--
state.Intel {
control.1 {
iface CARD
name 'Line Out Phantom Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.2 {
iface MIXER
name 'Beep Playback Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 65'
dbmin -3500
dbmax 3000
dbvalue.0 -3500
dbvalue.1 -3500
}
}
control.3 {
iface MIXER
name 'Beep Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.4 {
iface MIXER
name 'Off-hook Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.5 {
iface MIXER
name 'Caller ID Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.6 {
iface PCM
device 6
name 'Playback Channel Map'
value 0
comment {
access read
type INTEGER
count 1
range '0 - 36'
}
}
control.7 {
iface PCM
device 6
name 'Capture Channel Map'
value 0
comment {
access read
type INTEGER
count 1
range '0 - 36'
}
}
control.8 {
iface MIXER
name 'PCM Playback Volume'
value.0 255
value.1 255
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '0000000100000008ffffec1400000014'
dbmin -5100
dbmax 0
dbvalue.0 0
dbvalue.1 0
}
}
}
--endcollapse--
!!Sysfs Files
!!-----------
/sys/class/sound/hwC0D0/init_pin_configs:
0x14 0x00000000
0x15 0x00000000
0x16 0x00000000
0x17 0x00000000
0x18 0x00000000
0x19 0x00000000
0x1a 0x00000000
0x1b 0x00000000
0x1c 0x00000000
0x1d 0x00000000
0x1e 0x01000000
0x1f 0x00000000
/sys/class/sound/hwC0D0/driver_pin_configs:
/sys/class/sound/hwC0D0/user_pin_configs:
/sys/class/sound/hwC0D0/init_verbs:
/sys/class/sound/hwC0D0/hints:
/sys/class/sound/hwC0D1/init_pin_configs:
/sys/class/sound/hwC0D1/driver_pin_configs:
/sys/class/sound/hwC0D1/user_pin_configs:
/sys/class/sound/hwC0D1/init_verbs:
/sys/class/sound/hwC0D1/hints:
!!ALSA/HDA dmesg
!!--------------
[ 29.335966] ipw2200: Detected geography ZZE (13 802.11bg channels, 19
802.11a channels)
[ 29.378618] snd_hda_intel 0000:00:1b.0: irq 46 for MSI/MSI-X
[ 29.673379] sound hdaudioC0D0: autoconfig: line_outs=0
(0x0/0x0/0x0/0x0/0x0) type:line
[ 29.673387] sound hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 29.673390] sound hdaudioC0D0: hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 29.673393] sound hdaudioC0D0: mono: mono_out=0x1e
[ 29.673396] sound hdaudioC0D0: inputs:
[ 30.010420] Bluetooth: RFCOMM TTY layer initialized
1
0
A recent kernel upgrade caused my headphones to stop working.
I asked on #alsa about this and after a lot of help from "debianuser"
(thank you very much), he suggested I report this to this list.
I'm using x86-64 Fedora 22.
The kernel that works is kernel-4.0.5-300.fc22.x86_64.
The kernel that fails is kernel-4.1.3-200.fc22.x86_64.
(These are the RPM package names in case that isn't clear.)
The output from alsa-info.sh for the working case:
http://www.alsa-project.org/db/?f=1da69e358935e2d4a35513fc308a74a07925a4fd
... and for the failing case:
http://www.alsa-project.org/db/?f=6a1439affc507f1b83f99b5f42b7cbfe0664f9e8
I'm happy to provide other information as needed, though you'll have to
tell me exactly what to do, and turnaround may be on the slow side.
thanks,
Tom
1
0
[alsa-devel] [PATCH v2 0/6] ASoC: Intel: Skylake: Add DSP management routines
by Vinod Koul 07 Aug '15
by Vinod Koul 07 Aug '15
07 Aug '15
This is second rev of series to add DSP management routines for SKL driver
The first two patches are fixes to use ACPI header and size fix on NHLT
query
Then we add DSP module configuration calculation helpers followed by SRC and
updown calculation. These are used by next patch which adds module creation,
and binding routines. Lastly modules are used by pipes so we add pipelines
creation, destroy and scheduling helpers
Hardik T Shah (1):
ASoC: Intel: Skylake: Add helpers for SRC and converter modules
Jeeja KP (5):
ASoC: Intel: Skylake: Fix the NHLT rate size
ASoC: Intel: Skylake: Use acpi header for NHLT header
ASoC: Intel: Skylake: Add helpers for DSP module configuration
ASoC: Intel: Skylake: Add DSP module init and binding routines
ASoC: Intel: Skylake: Add pipe management helpers
sound/soc/intel/skylake/skl-messages.c | 751 +++++++++++++++++++++++++++
sound/soc/intel/skylake/skl-nhlt.c | 3 +-
sound/soc/intel/skylake/skl-nhlt.h | 14 +-
sound/soc/intel/skylake/skl-topology.h | 286 ++++++++++
sound/soc/intel/skylake/skl-tplg-interface.h | 88 ++++
5 files changed, 1128 insertions(+), 14 deletions(-)
create mode 100644 sound/soc/intel/skylake/skl-topology.h
create mode 100644 sound/soc/intel/skylake/skl-tplg-interface.h
--
1.9.1
2
12
This patchset adds support for the Rockchip SPDIF transceiver as present on
RK3066, RK3188 and RK3288 boards and enables it on a Radxa rock pro.
Tested on a Radxa Rock Pro board.
Sjoerd Simons (4):
ASoC: dt-bindings: add rockchip tranceiver bindings
ASoc: rockchip: Add rockchip SPDIF transceiver driver
ARM: dts: rockchip: Add SPDIF transceiver for RK3188
ARM: dts: rockchip: Add SPDIF optical out on Radxa Rock
.../devicetree/bindings/sound/rockchip-spdif.txt | 41 +++
arch/arm/boot/dts/rk3188-radxarock.dts | 19 ++
arch/arm/boot/dts/rk3188.dtsi | 22 ++
sound/soc/rockchip/Kconfig | 9 +
sound/soc/rockchip/Makefile | 3 +
sound/soc/rockchip/rockchip_spdif.c | 375 +++++++++++++++++++++
sound/soc/rockchip/rockchip_spdif.h | 63 ++++
7 files changed, 532 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/rockchip-spdif.txt
create mode 100644 sound/soc/rockchip/rockchip_spdif.c
create mode 100644 sound/soc/rockchip/rockchip_spdif.h
--
2.4.6
5
10