* [PATCH 0/2] ASoC: Intel: kbl: update dmic fixup params
@ 2017-11-09 14:04 Naveen Manohar
2017-11-09 14:04 ` [PATCH 1/2] ASoC: Intel: kbl: Remove option of choosing CH count based on pdata Naveen Manohar
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Naveen Manohar @ 2017-11-09 14:04 UTC (permalink / raw)
To: alsa-devel
Cc: vinod.koul, liam.r.girdwood, tiwai, broonie, naveen.m,
pierre-louis.bossart
Update dmic fixup params to always expose QUAD channel capture device,
enabling User-space to control channel count.
Assign min and max channel only based on input hw_params.
And removes choosing the channel count based on pdata.
Naveen Manohar (2):
ASoC: Intel: kbl: Remove option of choosing CH count based on pdata
ASoC: Intel: kbl: update dmic fixup params
sound/soc/intel/boards/kbl_rt5663_max98927.c | 44 +++++++++-------------------
1 file changed, 14 insertions(+), 30 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] ASoC: Intel: kbl: Remove option of choosing CH count based on pdata
2017-11-09 14:04 [PATCH 0/2] ASoC: Intel: kbl: update dmic fixup params Naveen Manohar
@ 2017-11-09 14:04 ` Naveen Manohar
2017-11-16 11:48 ` Mark Brown
2017-11-09 14:04 ` [PATCH 2/2] ASoC: Intel: kbl: update dmic fixup params Naveen Manohar
2017-11-15 4:55 ` [PATCH 0/2] " Vinod Koul
2 siblings, 1 reply; 6+ messages in thread
From: Naveen Manohar @ 2017-11-09 14:04 UTC (permalink / raw)
To: alsa-devel
Cc: vinod.koul, liam.r.girdwood, tiwai, broonie, naveen.m,
pierre-louis.bossart
User-space expects 4ch DMIC data and uses channel-map in ucm to
figure-out the desired channel to use. Hence removing driver change
to allow choosing channels using pdata.
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
---
sound/soc/intel/boards/kbl_rt5663_max98927.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index 7f76074..661f164 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -390,26 +390,6 @@ static int kabylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
return 0;
}
-static unsigned int channels_dmic[] = {
- 2, 4,
-};
-
-static struct snd_pcm_hw_constraint_list constraints_dmic_channels = {
- .count = ARRAY_SIZE(channels_dmic),
- .list = channels_dmic,
- .mask = 0,
-};
-
-static const unsigned int dmic_2ch[] = {
- 2,
-};
-
-static const struct snd_pcm_hw_constraint_list constraints_dmic_2ch = {
- .count = ARRAY_SIZE(dmic_2ch),
- .list = dmic_2ch,
- .mask = 0,
-};
-
static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
@@ -838,7 +818,6 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
static int kabylake_audio_probe(struct platform_device *pdev)
{
struct kbl_rt5663_private *ctx;
- struct skl_machine_pdata *pdata;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
if (!ctx)
@@ -852,11 +831,6 @@ static int kabylake_audio_probe(struct platform_device *pdev)
kabylake_audio_card->dev = &pdev->dev;
snd_soc_card_set_drvdata(kabylake_audio_card, ctx);
- pdata = dev_get_drvdata(&pdev->dev);
- if (pdata)
- dmic_constraints = pdata->dmic_num == 2 ?
- &constraints_dmic_2ch : &constraints_dmic_channels;
-
return devm_snd_soc_register_card(&pdev->dev, kabylake_audio_card);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] ASoC: Intel: kbl: Remove option of choosing CH count based on pdata
2017-11-09 14:04 ` [PATCH 1/2] ASoC: Intel: kbl: Remove option of choosing CH count based on pdata Naveen Manohar
@ 2017-11-16 11:48 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2017-11-16 11:48 UTC (permalink / raw)
To: Naveen Manohar
Cc: vinod.koul, tiwai, alsa-devel, liam.r.girdwood,
pierre-louis.bossart
[-- Attachment #1.1: Type: text/plain, Size: 329 bytes --]
On Thu, Nov 09, 2017 at 07:34:35PM +0530, Naveen Manohar wrote:
> User-space expects 4ch DMIC data and uses channel-map in ucm to
> figure-out the desired channel to use. Hence removing driver change
> to allow choosing channels using pdata.
Which userspace and are you sure there are no boards that only have two
of the mics?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] ASoC: Intel: kbl: update dmic fixup params
2017-11-09 14:04 [PATCH 0/2] ASoC: Intel: kbl: update dmic fixup params Naveen Manohar
2017-11-09 14:04 ` [PATCH 1/2] ASoC: Intel: kbl: Remove option of choosing CH count based on pdata Naveen Manohar
@ 2017-11-09 14:04 ` Naveen Manohar
2017-11-15 4:55 ` [PATCH 0/2] " Vinod Koul
2 siblings, 0 replies; 6+ messages in thread
From: Naveen Manohar @ 2017-11-09 14:04 UTC (permalink / raw)
To: alsa-devel
Cc: vinod.koul, liam.r.girdwood, tiwai, broonie, naveen.m,
pierre-louis.bossart
Update dmic fixup params to always expose QUAD channel capture
device, enabling User-space to control channel count.
Assign min and max channel only based on input hw_params.
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
---
sound/soc/intel/boards/kbl_rt5663_max98927.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index 661f164..27c8cf3 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -33,9 +33,9 @@
#define DMIC_CH(p) p->list[p->count-1]
#define MAXIM_DEV0_NAME "i2c-MX98927:00"
#define MAXIM_DEV1_NAME "i2c-MX98927:01"
+#define QUAD_CHANNEL 4
static struct snd_soc_card *kabylake_audio_card;
-static const struct snd_pcm_hw_constraint_list *dmic_constraints;
static struct snd_soc_jack skylake_hdmi[3];
struct kbl_hdmi_pcm {
@@ -305,6 +305,16 @@ static int kabylake_5663_hdmi2_init(struct snd_soc_pcm_runtime *rtd)
.mask = 0,
};
+static const unsigned int channels_quad[] = {
+ QUAD_CHANNEL,
+};
+
+static const struct snd_pcm_hw_constraint_list constraints_channels_quad = {
+ .count = ARRAY_SIZE(channels_quad),
+ .list = channels_quad,
+ .mask = 0,
+};
+
static int kbl_fe_startup(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
@@ -382,7 +392,7 @@ static int kabylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_interval *channels = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS);
- if (params_channels(params) == 2 || DMIC_CH(dmic_constraints) == 2)
+ if (params_channels(params) == 2)
channels->min = channels->max = 2;
else
channels->min = channels->max = 4;
@@ -394,9 +404,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
- runtime->hw.channels_max = DMIC_CH(dmic_constraints);
+ runtime->hw.channels_min = runtime->hw.channels_max = QUAD_CHANNEL;
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
- dmic_constraints);
+ &constraints_channels_quad);
return snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/2] ASoC: Intel: kbl: update dmic fixup params
2017-11-09 14:04 [PATCH 0/2] ASoC: Intel: kbl: update dmic fixup params Naveen Manohar
2017-11-09 14:04 ` [PATCH 1/2] ASoC: Intel: kbl: Remove option of choosing CH count based on pdata Naveen Manohar
2017-11-09 14:04 ` [PATCH 2/2] ASoC: Intel: kbl: update dmic fixup params Naveen Manohar
@ 2017-11-15 4:55 ` Vinod Koul
2 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2017-11-15 4:55 UTC (permalink / raw)
To: Naveen Manohar
Cc: tiwai, liam.r.girdwood, alsa-devel, broonie, pierre-louis.bossart
On Thu, Nov 09, 2017 at 07:34:34PM +0530, Naveen Manohar wrote:
> Update dmic fixup params to always expose QUAD channel capture device,
> enabling User-space to control channel count.
> Assign min and max channel only based on input hw_params.
> And removes choosing the channel count based on pdata.
Acked-By: Vinod Koul <vinod.koul@intel.com>
> Naveen Manohar (2):
> ASoC: Intel: kbl: Remove option of choosing CH count based on pdata
> ASoC: Intel: kbl: update dmic fixup params
>
> sound/soc/intel/boards/kbl_rt5663_max98927.c | 44 +++++++++-------------------
> 1 file changed, 14 insertions(+), 30 deletions(-)
>
> --
> 1.9.1
>
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/2] dmic fix to allow userspace to choose ch count
@ 2021-02-18 12:31 vamshi.krishna.gopal
2021-02-18 12:31 ` [PATCH 2/2] ASoC: Intel: kbl: update dmic fixup params vamshi.krishna.gopal
0 siblings, 1 reply; 6+ messages in thread
From: vamshi.krishna.gopal @ 2021-02-18 12:31 UTC (permalink / raw)
To: alsa-devel; +Cc: harshapriya.n, naveen.m, biernacki, sathya.prakash.m.r
From: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.corp-partner.google.com>
hello,
git.kernel.org/pub/scm/linux/kernel/git/vkoul/sound.git/commit/?h=intel2&id=c5e7e00788229ab8491676a424fb42778038ad29
git.kernel.org/pub/scm/linux/kernel/git/vkoul/sound.git/commit/?h=intel2&id=d87fa3f7a365bcccb396146ada03e03a4574159d
These patch series is about removing channel count selection based on mach/pdata
and assign min and max channel only based on hw params. This allows
userspcae to choose channel count.
This patch series was Acked by Vinod and taken into his tree.
But seems its missed to be posted.
hence i've rebased the same commits and re sending.
Naveen Manohar (2):
ASoC: Intel: kbl: Remove option of choosing CH count based on pdata
ASoC: Intel: kbl: update dmic fixup params
sound/soc/intel/boards/kbl_rt5663_max98927.c | 44 +++++++-------------
1 file changed, 14 insertions(+), 30 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] ASoC: Intel: kbl: update dmic fixup params
2021-02-18 12:31 [PATCH 0/2] dmic fix to allow userspace to choose ch count vamshi.krishna.gopal
@ 2021-02-18 12:31 ` vamshi.krishna.gopal
0 siblings, 0 replies; 6+ messages in thread
From: vamshi.krishna.gopal @ 2021-02-18 12:31 UTC (permalink / raw)
To: alsa-devel; +Cc: harshapriya.n, naveen.m, biernacki, sathya.prakash.m.r
From: Naveen Manohar <naveen.m@intel.com>
Update dmic fixup params to always expose QUAD channel capture
device, enabling User-space to control channel count.
Assign min and max channel only based on input hw_params.
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
---
sound/soc/intel/boards/kbl_rt5663_max98927.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index adfa2c044aed..a1bcde7851b7 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -29,9 +29,9 @@
#define DMIC_CH(p) p->list[p->count-1]
#define MAXIM_DEV0_NAME "i2c-MX98927:00"
#define MAXIM_DEV1_NAME "i2c-MX98927:01"
+#define QUAD_CHANNEL 4
static struct snd_soc_card *kabylake_audio_card;
-static const struct snd_pcm_hw_constraint_list *dmic_constraints;
static struct snd_soc_jack skylake_hdmi[3];
struct kbl_hdmi_pcm {
@@ -365,6 +365,16 @@ static const struct snd_pcm_hw_constraint_list constraints_channels = {
.mask = 0,
};
+static const unsigned int channels_quad[] = {
+ QUAD_CHANNEL,
+};
+
+static const struct snd_pcm_hw_constraint_list constraints_channels_quad = {
+ .count = ARRAY_SIZE(channels_quad),
+ .list = channels_quad,
+ .mask = 0,
+};
+
static int kbl_fe_startup(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
@@ -480,7 +490,7 @@ static int kabylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_interval *chan = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS);
- if (params_channels(params) == 2 || DMIC_CH(dmic_constraints) == 2)
+ if (params_channels(params) == 2)
chan->min = chan->max = 2;
else
chan->min = chan->max = 4;
@@ -528,9 +538,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
- runtime->hw.channels_max = DMIC_CH(dmic_constraints);
+ runtime->hw.channels_min = runtime->hw.channels_max = QUAD_CHANNEL;
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
- dmic_constraints);
+ &constraints_channels_quad);
return snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-02-18 12:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 14:04 [PATCH 0/2] ASoC: Intel: kbl: update dmic fixup params Naveen Manohar
2017-11-09 14:04 ` [PATCH 1/2] ASoC: Intel: kbl: Remove option of choosing CH count based on pdata Naveen Manohar
2017-11-16 11:48 ` Mark Brown
2017-11-09 14:04 ` [PATCH 2/2] ASoC: Intel: kbl: update dmic fixup params Naveen Manohar
2017-11-15 4:55 ` [PATCH 0/2] " Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2021-02-18 12:31 [PATCH 0/2] dmic fix to allow userspace to choose ch count vamshi.krishna.gopal
2021-02-18 12:31 ` [PATCH 2/2] ASoC: Intel: kbl: update dmic fixup params vamshi.krishna.gopal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox