diff options
author | Margarita Olaya <x0080101@ti.com> | 2009-10-10 19:27:15 -0500 |
---|---|---|
committer | Misael Lopez Cruz <x0052729@ti.com> | 2009-10-16 14:25:32 -0500 |
commit | ef27cd5bba80c6d59e7dee5b610f255ec23ded5a (patch) | |
tree | 2d6eb2fafef84ab9ffd499589aedb31c01d55791 /sound | |
parent | e9c530bd49f07280caa8ffc93ae3b9c82bd26c42 (diff) |
ASoC: OMAP4: Fixes for fullduplex test
This change is done to call omap_mcpdm_start once for each stream, that
allows to execute fullduplex test, also a flag was added to verified that
abe is already configured.
Signed-off-by: Margarita Olaya <x0080101@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/abe-twl6030.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/omap-abe.c | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sound/soc/codecs/abe-twl6030.c b/sound/soc/codecs/abe-twl6030.c index 335d1d033902..57c3165fd8db 100644 --- a/sound/soc/codecs/abe-twl6030.c +++ b/sound/soc/codecs/abe-twl6030.c @@ -54,6 +54,7 @@ struct twl6030_data { unsigned int sysclk; struct snd_pcm_hw_constraint_list *sysclk_constraints; struct completion ready; + int configure; }; /* @@ -919,7 +920,8 @@ static int abe_mm_startup(struct snd_pcm_substream *substream, SNDRV_PCM_HW_PARAM_RATE, priv->sysclk_constraints); - abe_default_configuration(UC2_VOICE_CALL_AND_IHF_MMDL); + if (!priv->configure++) + abe_default_configuration(UC2_VOICE_CALL_AND_IHF_MMDL); return 0; } diff --git a/sound/soc/omap/omap-abe.c b/sound/soc/omap/omap-abe.c index 011fb675975b..b75b405ddfce 100644 --- a/sound/soc/omap/omap-abe.c +++ b/sound/soc/omap/omap-abe.c @@ -41,7 +41,7 @@ struct omap_mcpdm_data { struct omap_mcpdm_link *links; - int active; + int active[2]; int requested; }; @@ -58,13 +58,14 @@ static struct omap_mcpdm_link omap_mcpdm_links[] = { .irq_mask = UP_IRQ_EMPTY | UP_IRQ_FULL, .threshold = 1, .format = PDMOUTFORMAT_LJUST, - .channels = PDM_UP_MASK | PDM_STATUS_MASK, + .channels = PDM_UP_MASK | PDM_STATUS_MASK | + PDM_DN_MASK | PDM_CMD_MASK, }, }; static struct omap_mcpdm_data mcpdm_data = { .links = omap_mcpdm_links, - .active = 0, + .active = {0}, .requested = 0, }; @@ -122,14 +123,14 @@ static int omap_abe_dai_trigger(struct snd_pcm_substream *substream, int cmd, case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - if (!mcpdm_priv->active++) + if (!mcpdm_priv->active[stream]++) omap_mcpdm_start(stream); break; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - if (!--mcpdm_priv->active) + if (!--mcpdm_priv->active[stream]) omap_mcpdm_stop(stream); break; default: |