diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-08 04:35:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-08 04:35:30 -0400 |
commit | 5ea472a77f8e4811ceee3f44a9deda6ad6e8b789 (patch) | |
tree | a9ec5019e2b666a19874fc344ffb0dd5da6bce94 /sound/soc/pxa/pxa-ssp.c | |
parent | 6c009ecef8cca28c7c09eb16d0802e37915a76e1 (diff) | |
parent | 577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff) |
Merge commit 'v2.6.30-rc1' into perfcounters/core
Conflicts:
arch/powerpc/include/asm/systbl.h
arch/powerpc/include/asm/unistd.h
include/linux/init_task.h
Merge reason: the conflicts are non-trivial: PowerPC placement
of sys_perf_counter_open has to be mixed with the
new preadv/pwrite syscalls.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'sound/soc/pxa/pxa-ssp.c')
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 7acd3febf8b0..308a657928d2 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -627,12 +627,18 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
627 | u32 sscr0; | 627 | u32 sscr0; |
628 | u32 sspsp; | 628 | u32 sspsp; |
629 | int width = snd_pcm_format_physical_width(params_format(params)); | 629 | int width = snd_pcm_format_physical_width(params_format(params)); |
630 | int ttsa = ssp_read_reg(ssp, SSTSA) & 0xf; | ||
630 | 631 | ||
631 | /* select correct DMA params */ | 632 | /* select correct DMA params */ |
632 | if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) | 633 | if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) |
633 | dma = 1; /* capture DMA offset is 1,3 */ | 634 | dma = 1; /* capture DMA offset is 1,3 */ |
634 | if (chn == 2) | 635 | /* Network mode with one active slot (ttsa == 1) can be used |
635 | dma += 2; /* stereo DMA offset is 2, mono is 0 */ | 636 | * to force 16-bit frame width on the wire (for S16_LE), even |
637 | * with two channels. Use 16-bit DMA transfers for this case. | ||
638 | */ | ||
639 | if (((chn == 2) && (ttsa != 1)) || (width == 32)) | ||
640 | dma += 2; /* 32-bit DMA offset is 2, 16-bit is 0 */ | ||
641 | |||
636 | cpu_dai->dma_data = ssp_dma_params[cpu_dai->id][dma]; | 642 | cpu_dai->dma_data = ssp_dma_params[cpu_dai->id][dma]; |
637 | 643 | ||
638 | dev_dbg(&ssp->pdev->dev, "pxa_ssp_hw_params: dma %d\n", dma); | 644 | dev_dbg(&ssp->pdev->dev, "pxa_ssp_hw_params: dma %d\n", dma); |
@@ -712,7 +718,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
712 | /* When we use a network mode, we always require TDM slots | 718 | /* When we use a network mode, we always require TDM slots |
713 | * - complain loudly and fail if they've not been set up yet. | 719 | * - complain loudly and fail if they've not been set up yet. |
714 | */ | 720 | */ |
715 | if ((sscr0 & SSCR0_MOD) && !(ssp_read_reg(ssp, SSTSA) & 0xf)) { | 721 | if ((sscr0 & SSCR0_MOD) && !ttsa) { |
716 | dev_err(&ssp->pdev->dev, "No TDM timeslot configured\n"); | 722 | dev_err(&ssp->pdev->dev, "No TDM timeslot configured\n"); |
717 | return -EINVAL; | 723 | return -EINVAL; |
718 | } | 724 | } |