* [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names
@ 2014-02-25 13:17 Jarkko Nikula
2014-02-25 13:17 ` [PATCH 2/2] ASoC: Intel: byt-rt5640: Use init time DAI format Jarkko Nikula
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jarkko Nikula @ 2014-02-25 13:17 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown, Jarkko Nikula, Liam Girdwood
Use more sensible kcontrol names than "Int Mic" and "Ext Spk". Speakers
especially are usually integrated devices in sales models.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/byt-rt5640.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
index 038547b48b2d..672fedbfa680 100644
--- a/sound/soc/intel/byt-rt5640.c
+++ b/sound/soc/intel/byt-rt5640.c
@@ -29,27 +29,27 @@
static const struct snd_soc_dapm_widget byt_rt5640_widgets[] = {
SND_SOC_DAPM_HP("Headphone", NULL),
SND_SOC_DAPM_MIC("Headset Mic", NULL),
- SND_SOC_DAPM_MIC("Int Mic", NULL),
- SND_SOC_DAPM_SPK("Ext Spk", NULL),
+ SND_SOC_DAPM_MIC("Internal Mic", NULL),
+ SND_SOC_DAPM_SPK("Speaker", NULL),
};
static const struct snd_soc_dapm_route byt_rt5640_audio_map[] = {
{"IN2P", NULL, "Headset Mic"},
{"IN2N", NULL, "Headset Mic"},
- {"DMIC1", NULL, "Int Mic"},
+ {"DMIC1", NULL, "Internal Mic"},
{"Headphone", NULL, "HPOL"},
{"Headphone", NULL, "HPOR"},
- {"Ext Spk", NULL, "SPOLP"},
- {"Ext Spk", NULL, "SPOLN"},
- {"Ext Spk", NULL, "SPORP"},
- {"Ext Spk", NULL, "SPORN"},
+ {"Speaker", NULL, "SPOLP"},
+ {"Speaker", NULL, "SPOLN"},
+ {"Speaker", NULL, "SPORP"},
+ {"Speaker", NULL, "SPORN"},
};
static const struct snd_kcontrol_new byt_rt5640_controls[] = {
SOC_DAPM_PIN_SWITCH("Headphone"),
SOC_DAPM_PIN_SWITCH("Headset Mic"),
- SOC_DAPM_PIN_SWITCH("Int Mic"),
- SOC_DAPM_PIN_SWITCH("Ext Spk"),
+ SOC_DAPM_PIN_SWITCH("Internal Mic"),
+ SOC_DAPM_PIN_SWITCH("Speaker"),
};
static int byt_rt5640_hw_params(struct snd_pcm_substream *substream,
@@ -113,8 +113,8 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
snd_soc_dapm_enable_pin(dapm, "Headset Mic");
snd_soc_dapm_enable_pin(dapm, "Headphone");
- snd_soc_dapm_enable_pin(dapm, "Ext Spk");
- snd_soc_dapm_enable_pin(dapm, "Int Mic");
+ snd_soc_dapm_enable_pin(dapm, "Speaker");
+ snd_soc_dapm_enable_pin(dapm, "Internal Mic");
snd_soc_dapm_sync(dapm);
return ret;
--
1.8.5.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ASoC: Intel: byt-rt5640: Use init time DAI format
2014-02-25 13:17 [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names Jarkko Nikula
@ 2014-02-25 13:17 ` Jarkko Nikula
2014-02-25 13:43 ` [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names Liam Girdwood
2014-02-25 23:49 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Jarkko Nikula @ 2014-02-25 13:17 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown, Jarkko Nikula, Liam Girdwood
Setting static DAI format has been supported in the soc-core quite some time
now so there is no need to set it runtime in machine driver.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/byt-rt5640.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
index 672fedbfa680..eff97c8e5218 100644
--- a/sound/soc/intel/byt-rt5640.c
+++ b/sound/soc/intel/byt-rt5640.c
@@ -57,19 +57,8 @@ static int byt_rt5640_hw_params(struct snd_pcm_substream *substream,
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->codec_dai;
- unsigned int fmt;
int ret;
- fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
- SND_SOC_DAIFMT_CBS_CFS;
-
- ret = snd_soc_dai_set_fmt(codec_dai, fmt);
- if (ret < 0) {
- dev_err(codec_dai->dev,
- "can't set codec DAI configuration %d\n", ret);
- return ret;
- }
-
ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_PLL1,
params_rate(params) * 256,
SND_SOC_CLOCK_IN);
@@ -132,6 +121,8 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {
.codec_dai_name = "rt5640-aif1",
.codec_name = "i2c-10EC5640:00",
.platform_name = "baytrail-pcm-audio",
+ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBS_CFS,
.init = byt_rt5640_init,
.ignore_suspend = 1,
.ops = &byt_rt5640_ops,
@@ -143,6 +134,8 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {
.codec_dai_name = "rt5640-aif1",
.codec_name = "i2c-10EC5640:00",
.platform_name = "baytrail-pcm-audio",
+ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+ SND_SOC_DAIFMT_CBS_CFS,
.init = NULL,
.ignore_suspend = 1,
.ops = &byt_rt5640_ops,
--
1.8.5.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names
2014-02-25 13:17 [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names Jarkko Nikula
2014-02-25 13:17 ` [PATCH 2/2] ASoC: Intel: byt-rt5640: Use init time DAI format Jarkko Nikula
@ 2014-02-25 13:43 ` Liam Girdwood
2014-02-25 23:49 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2014-02-25 13:43 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, Mark Brown, Liam Girdwood
On Tue, 2014-02-25 at 15:17 +0200, Jarkko Nikula wrote:
> Use more sensible kcontrol names than "Int Mic" and "Ext Spk". Speakers
> especially are usually integrated devices in sales models.
>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> sound/soc/intel/byt-rt5640.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
> index 038547b48b2d..672fedbfa680 100644
> --- a/sound/soc/intel/byt-rt5640.c
> +++ b/sound/soc/intel/byt-rt5640.c
> @@ -29,27 +29,27 @@
> static const struct snd_soc_dapm_widget byt_rt5640_widgets[] = {
> SND_SOC_DAPM_HP("Headphone", NULL),
> SND_SOC_DAPM_MIC("Headset Mic", NULL),
> - SND_SOC_DAPM_MIC("Int Mic", NULL),
> - SND_SOC_DAPM_SPK("Ext Spk", NULL),
> + SND_SOC_DAPM_MIC("Internal Mic", NULL),
> + SND_SOC_DAPM_SPK("Speaker", NULL),
> };
>
> static const struct snd_soc_dapm_route byt_rt5640_audio_map[] = {
> {"IN2P", NULL, "Headset Mic"},
> {"IN2N", NULL, "Headset Mic"},
> - {"DMIC1", NULL, "Int Mic"},
> + {"DMIC1", NULL, "Internal Mic"},
> {"Headphone", NULL, "HPOL"},
> {"Headphone", NULL, "HPOR"},
> - {"Ext Spk", NULL, "SPOLP"},
> - {"Ext Spk", NULL, "SPOLN"},
> - {"Ext Spk", NULL, "SPORP"},
> - {"Ext Spk", NULL, "SPORN"},
> + {"Speaker", NULL, "SPOLP"},
> + {"Speaker", NULL, "SPOLN"},
> + {"Speaker", NULL, "SPORP"},
> + {"Speaker", NULL, "SPORN"},
> };
>
> static const struct snd_kcontrol_new byt_rt5640_controls[] = {
> SOC_DAPM_PIN_SWITCH("Headphone"),
> SOC_DAPM_PIN_SWITCH("Headset Mic"),
> - SOC_DAPM_PIN_SWITCH("Int Mic"),
> - SOC_DAPM_PIN_SWITCH("Ext Spk"),
> + SOC_DAPM_PIN_SWITCH("Internal Mic"),
> + SOC_DAPM_PIN_SWITCH("Speaker"),
> };
>
> static int byt_rt5640_hw_params(struct snd_pcm_substream *substream,
> @@ -113,8 +113,8 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
>
> snd_soc_dapm_enable_pin(dapm, "Headset Mic");
> snd_soc_dapm_enable_pin(dapm, "Headphone");
> - snd_soc_dapm_enable_pin(dapm, "Ext Spk");
> - snd_soc_dapm_enable_pin(dapm, "Int Mic");
> + snd_soc_dapm_enable_pin(dapm, "Speaker");
> + snd_soc_dapm_enable_pin(dapm, "Internal Mic");
>
> snd_soc_dapm_sync(dapm);
> return ret;
Both
Acked-by: Liam Girdwoood <liam.r.girdwood@linux.intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names
2014-02-25 13:17 [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names Jarkko Nikula
2014-02-25 13:17 ` [PATCH 2/2] ASoC: Intel: byt-rt5640: Use init time DAI format Jarkko Nikula
2014-02-25 13:43 ` [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names Liam Girdwood
@ 2014-02-25 23:49 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-02-25 23:49 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 221 bytes --]
On Tue, Feb 25, 2014 at 03:17:27PM +0200, Jarkko Nikula wrote:
> Use more sensible kcontrol names than "Int Mic" and "Ext Spk". Speakers
> especially are usually integrated devices in sales models.
Applied both, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-25 23:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-25 13:17 [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names Jarkko Nikula
2014-02-25 13:17 ` [PATCH 2/2] ASoC: Intel: byt-rt5640: Use init time DAI format Jarkko Nikula
2014-02-25 13:43 ` [PATCH 1/2] ASoC: Intel: byt-rt5640: Update internal mic and speaker kcontrol names Liam Girdwood
2014-02-25 23:49 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).