summaryrefslogtreecommitdiff
path: root/sound/soc/imx/imx-3stack-bt.c
diff options
context:
space:
mode:
authorAlan Tull <r80115@freescale.com>2009-11-02 19:44:22 -0600
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-12 17:19:31 +0100
commitfa012c4c0927fe862397110c7c23d3a6b516374e (patch)
tree29f2ef3da1bb4122f76e0a05ab68ca831564dfa3 /sound/soc/imx/imx-3stack-bt.c
parent90f3c1e8f3b63ae6a7aca35b17740e48b8055167 (diff)
ENGR00118016-1 ASoC : upgrade audio support to 2.6.31
Move regulator control into codec drivers. Move codec platform data to machine layer. Remove unused fields from mxc_audio_platform_data. soc multiple audio cards support: dai_list is a list for all registered codec/cpu dais. One codec/cpu dais can't be registered twice, so move the cpu dai registering into imx-ssi.c/imx-esai.c Fix ak4647_read_reg error. Put ssi/esai mode in the cpu_dai private_data. sgtl5000: Fix the power for MX35 1. MX35 vddio and vddd are directly connected to external 3V3. It has no regulator control. 2. sgtl5000 needs some time to be ready after vdda is switched on so msleep(1) is added before regiter read/write. 3. On MX35 platform, vdda is from VCAM. Signed-off-by: Alan Tull <r80115@freescale.com> Signed-off-by: Wallace Wang <r59996@freescale.com>
Diffstat (limited to 'sound/soc/imx/imx-3stack-bt.c')
-rw-r--r--sound/soc/imx/imx-3stack-bt.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sound/soc/imx/imx-3stack-bt.c b/sound/soc/imx/imx-3stack-bt.c
index ca0679797df8..28d47eeba62d 100644
--- a/sound/soc/imx/imx-3stack-bt.c
+++ b/sound/soc/imx/imx-3stack-bt.c
@@ -105,6 +105,7 @@ static int imx_3stack_bt_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai_link *pcm_link = rtd->dai;
struct snd_soc_dai *cpu_dai = pcm_link->cpu_dai;
unsigned int channels = params_channels(params);
+ struct imx_ssi *ssi_mode = (struct imx_ssi *)cpu_dai->private_data;
int ret = 0;
u32 dai_format;
@@ -116,6 +117,12 @@ static int imx_3stack_bt_hw_params(struct snd_pcm_substream *substream,
SND_SOC_DAIFMT_CBS_CFS;
#endif
+ ssi_mode->sync_mode = 1;
+ if (channels == 1)
+ ssi_mode->network_mode = 0;
+ else
+ ssi_mode->network_mode = 1;
+
/* set i.MX active slot mask */
snd_soc_dai_set_tdm_slot(cpu_dai,
channels == 1 ? 0xfffffffe : 0xfffffffc, 2);
@@ -152,7 +159,6 @@ static struct snd_soc_ops imx_3stack_bt_ops = {
static struct snd_soc_dai_link imx_3stack_dai = {
.name = "bluetooth",
.stream_name = "bluetooth",
- .cpu_dai = &imx_ssi_dai,
.codec_dai = &bt_dai,
.ops = &imx_3stack_bt_ops,
};
@@ -178,17 +184,14 @@ static int __init imx_3stack_bt_probe(struct platform_device *pdev)
{
struct mxc_audio_platform_data *dev_data = pdev->dev.platform_data;
struct imx_3stack_priv *priv = &card_priv;
-
- /* imx_3stack bt interface */
- imx_ssi_dai.private_data = dev_data;
- imx_ssi_dai.dev = &pdev->dev;
+ struct snd_soc_dai *bt_cpu_dai;
if (dev_data->src_port == 1)
- imx_ssi_dai.name = "imx-ssi-1";
+ bt_cpu_dai = &imx_ssi_dai[0];
else
- imx_ssi_dai.name = "imx-ssi-3";
+ bt_cpu_dai = &imx_ssi_dai[2];
- snd_soc_register_dai(&imx_ssi_dai);
+ imx_3stack_dai.cpu_dai = bt_cpu_dai;
/* Configure audio port */
imx_3stack_init_dam(dev_data->src_port, dev_data->ext_port);