|
@@ -220,6 +220,40 @@ static struct snd_soc_ops broxton_dmic_ops = {
|
|
.startup = broxton_dmic_startup,
|
|
.startup = broxton_dmic_startup,
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static unsigned int channels[] = {
|
|
|
|
+ 2,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct snd_pcm_hw_constraint_list constraints_channels = {
|
|
|
|
+ .count = ARRAY_SIZE(channels),
|
|
|
|
+ .list = channels,
|
|
|
|
+ .mask = 0,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static int bxt_fe_startup(struct snd_pcm_substream *substream)
|
|
|
|
+{
|
|
|
|
+ struct snd_pcm_runtime *runtime = substream->runtime;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * on this platform for PCM device we support:
|
|
|
|
+ * 48Khz
|
|
|
|
+ * stereo
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+ runtime->hw.channels_max = 2;
|
|
|
|
+ snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
|
|
|
|
+ &constraints_channels);
|
|
|
|
+
|
|
|
|
+ snd_pcm_hw_constraint_list(runtime, 0,
|
|
|
|
+ SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static const struct snd_soc_ops broxton_rt286_fe_ops = {
|
|
|
|
+ .startup = bxt_fe_startup,
|
|
|
|
+};
|
|
|
|
+
|
|
/* broxton digital audio interface glue - connects codec <--> CPU */
|
|
/* broxton digital audio interface glue - connects codec <--> CPU */
|
|
static struct snd_soc_dai_link broxton_rt298_dais[] = {
|
|
static struct snd_soc_dai_link broxton_rt298_dais[] = {
|
|
/* Front End DAI links */
|
|
/* Front End DAI links */
|
|
@@ -235,6 +269,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = {
|
|
.codec_dai_name = "snd-soc-dummy-dai",
|
|
.codec_dai_name = "snd-soc-dummy-dai",
|
|
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
|
|
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
|
|
.dpcm_playback = 1,
|
|
.dpcm_playback = 1,
|
|
|
|
+ .ops = &broxton_rt286_fe_ops,
|
|
},
|
|
},
|
|
[BXT_DPCM_AUDIO_CP]
|
|
[BXT_DPCM_AUDIO_CP]
|
|
{
|
|
{
|
|
@@ -248,6 +283,7 @@ static struct snd_soc_dai_link broxton_rt298_dais[] = {
|
|
.codec_dai_name = "snd-soc-dummy-dai",
|
|
.codec_dai_name = "snd-soc-dummy-dai",
|
|
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
|
|
.trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
|
|
.dpcm_capture = 1,
|
|
.dpcm_capture = 1,
|
|
|
|
+ .ops = &broxton_rt286_fe_ops,
|
|
},
|
|
},
|
|
[BXT_DPCM_AUDIO_REF_CP]
|
|
[BXT_DPCM_AUDIO_REF_CP]
|
|
{
|
|
{
|