Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/fsl-card' and 'asoc/topic/fsl-mpc5200' into asoc-next

This commit is contained in:
Mark Brown
2016-03-13 15:17:01 +07:00
6 fájl változott, egészen pontosan 49 új sor hozzáadva és 8 régi sor törölve

Fájl megtekintése

@@ -292,8 +292,8 @@ config SND_SOC_FSL_ASOC_CARD
select SND_SOC_FSL_SSI
help
ALSA SoC Audio support with ASRC feature for Freescale SoCs that have
ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888
and SGTL5000.
ESAI/SAI/SSI and connect with external CODECs such as WM8962, CS42888,
CS4271, CS4272 and SGTL5000.
Say Y if you want to add support for Freescale Generic ASoC Sound Card.
endif # SND_IMX_SOC

Fájl megtekintése

@@ -28,6 +28,8 @@
#include "../codecs/wm8962.h"
#include "../codecs/wm8960.h"
#define CS427x_SYSCLK_MCLK 0
#define RX 0
#define TX 1
@@ -99,19 +101,26 @@ struct fsl_asoc_card_priv {
/**
* This dapm route map exsits for DPCM link only.
* The other routes shall go through Device Tree.
*
* Note: keep all ASRC routes in the second half
* to drop them easily for non-ASRC cases.
*/
static const struct snd_soc_dapm_route audio_map[] = {
{"CPU-Playback", NULL, "ASRC-Playback"},
/* 1st half -- Normal DAPM routes */
{"Playback", NULL, "CPU-Playback"},
{"ASRC-Capture", NULL, "CPU-Capture"},
{"CPU-Capture", NULL, "Capture"},
/* 2nd half -- ASRC DAPM routes */
{"CPU-Playback", NULL, "ASRC-Playback"},
{"ASRC-Capture", NULL, "CPU-Capture"},
};
static const struct snd_soc_dapm_route audio_map_ac97[] = {
{"AC97 Playback", NULL, "ASRC-Playback"},
/* 1st half -- Normal DAPM routes */
{"Playback", NULL, "AC97 Playback"},
{"ASRC-Capture", NULL, "AC97 Capture"},
{"AC97 Capture", NULL, "Capture"},
/* 2nd half -- ASRC DAPM routes */
{"AC97 Playback", NULL, "ASRC-Playback"},
{"ASRC-Capture", NULL, "AC97 Capture"},
};
/* Add all possible widgets into here without being redundant */
@@ -528,6 +537,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
priv->cpu_priv.sysclk_dir[RX] = SND_SOC_CLOCK_OUT;
priv->cpu_priv.slot_width = 32;
priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
} else if (of_device_is_compatible(np, "fsl,imx-audio-cs427x")) {
codec_dai_name = "cs4271-hifi";
priv->codec_priv.mclk_id = CS427x_SYSCLK_MCLK;
priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
} else if (of_device_is_compatible(np, "fsl,imx-audio-sgtl5000")) {
codec_dai_name = "sgtl5000";
priv->codec_priv.mclk_id = SGTL5000_SYSCLK;
@@ -593,6 +606,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
priv->card.dapm_widgets = fsl_asoc_card_dapm_widgets;
priv->card.num_dapm_widgets = ARRAY_SIZE(fsl_asoc_card_dapm_widgets);
/* Drop the second half of DAPM routes -- ASRC */
if (!asrc_pdev)
priv->card.num_dapm_routes /= 2;
memcpy(priv->dai_link, fsl_asoc_card_dai,
sizeof(struct snd_soc_dai_link) * ARRAY_SIZE(priv->dai_link));
@@ -681,6 +698,7 @@ fail:
static const struct of_device_id fsl_asoc_card_dt_ids[] = {
{ .compatible = "fsl,imx-audio-ac97", },
{ .compatible = "fsl,imx-audio-cs42888", },
{ .compatible = "fsl,imx-audio-cs427x", },
{ .compatible = "fsl,imx-audio-sgtl5000", },
{ .compatible = "fsl,imx-audio-wm8962", },
{ .compatible = "fsl,imx-audio-wm8960", },

Fájl megtekintése

@@ -13,6 +13,7 @@
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/delay.h>
#include <linux/time.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
@@ -127,7 +128,7 @@ static void psc_ac97_cold_reset(struct snd_ac97 *ac97)
mutex_unlock(&psc_dma->mutex);
msleep(1);
usleep_range(1000, 2000);
psc_ac97_warm_reset(ac97);
}