Re: [PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type

2011-05-13 Thread Liam Girdwood
On 11/05/11 14:55, Premi, Sanjeev wrote:
 Current checks for cpu type were too restrictive leading
 to failures for other silicons in same family.
 
 The problem was found while testing audio playback on
 AM37x and AM35x processors. But should exist on OMAP36xx
 as well.
 
 Signed-off-by: Sanjeev Premi pr...@ti.com
 cc: Mark Brown broo...@opensource.wolfsonmicro.com
 cc: Liam Girdwood l...@ti.com
 cc: Jarkko Nikula jhnik...@gmail.com
 ---
 
  Changes in v4:
Reposting after validating that patch still applies cleanly on
linux-omap master [46966f1]
 
Changed the subject as suggested by Jarkko. Since the subject
has changed, i have omitted v4.
 
  Changes in v3::
None. Reposting[1] after subscribing to alsa-devel list
 
  Changes in v2:
1) Added one more check to the changes.
2) Updated commit message to use plurals.
 
 
 
Applied.

Thanks

Liam
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type

2011-05-11 Thread Sanjeev Premi
Current checks for cpu type were too restrictive leading
to failures for other silicons in same family.

The problem was found while testing audio playback on
AM37x and AM35x processors. But should exist on OMAP36xx
as well.

Signed-off-by: Sanjeev Premi pr...@ti.com
cc: Mark Brown broo...@opensource.wolfsonmicro.com
cc: Liam Girdwood l...@ti.com
cc: Jarkko Nikula jhnik...@gmail.com
---

 Changes in v4:
   Reposting after validating that patch still applies cleanly on
   linux-omap master [46966f1]

   Changed the subject as suggested by Jarkko. Since the subject
   has changed, i have omitted v4.

 Changes in v3::
   None. Reposting[1] after subscribing to alsa-devel list

 Changes in v2:
   1) Added one more check to the changes.
   2) Updated commit message to use plurals.


 [1] http://marc.info/?l=linux-omapm=130026430110592w=2


 sound/soc/omap/omap-mcbsp.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 2175f09..a88a0bf 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -146,7 +146,7 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream 
*substream,
 * 2 channels (stereo): size is 128 / 2 = 64 frames (2 * 64 words)
 * 4 channels: size is 128 / 4 = 32 frames (4 * 32 words)
 */
-   if (cpu_is_omap343x() || cpu_is_omap44xx()) {
+   if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
/*
* Rule for the buffer size. We should not allow
* smaller buffer than the FIFO size to avoid underruns
@@ -258,7 +258,7 @@ static int omap_mcbsp_dai_hw_params(struct 
snd_pcm_substream *substream,
default:
return -EINVAL;
}
-   if (cpu_is_omap343x()) {
+   if (cpu_is_omap34xx()) {
dma_data-set_threshold = omap_mcbsp_set_threshold;
/* TODO: Currently, MODE_ELEMENT == MODE_FRAME */
if (omap_mcbsp_get_dma_op_mode(bus_id) ==
-- 
1.7.2.2

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] [PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type

2011-05-11 Thread Peter Ujfalusi
On Wednesday 11 May 2011 16:55:35 Premi, Sanjeev wrote:
 Current checks for cpu type were too restrictive leading
 to failures for other silicons in same family.
 
 The problem was found while testing audio playback on
 AM37x and AM35x processors. But should exist on OMAP36xx
 as well.
 
 Signed-off-by: Sanjeev Premi pr...@ti.com
 cc: Mark Brown broo...@opensource.wolfsonmicro.com
 cc: Liam Girdwood l...@ti.com
 cc: Jarkko Nikula jhnik...@gmail.com
 ---

Acked-by: Peter Ujfalusi peter.ujfal...@ti.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type

2011-05-11 Thread Jarkko Nikula
On Wed, 11 May 2011 19:25:35 +0530
Sanjeev Premi pr...@ti.com wrote:

 Current checks for cpu type were too restrictive leading
 to failures for other silicons in same family.
 
 The problem was found while testing audio playback on
 AM37x and AM35x processors. But should exist on OMAP36xx
 as well.
 
 Signed-off-by: Sanjeev Premi pr...@ti.com
 cc: Mark Brown broo...@opensource.wolfsonmicro.com
 cc: Liam Girdwood l...@ti.com
 cc: Jarkko Nikula jhnik...@gmail.com
 ---
Acked-by: Jarkko Nikula jhnik...@gmail.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type

2011-05-11 Thread Mark Brown
On Wed, May 11, 2011 at 07:25:35PM +0530, Sanjeev Premi wrote:
 Current checks for cpu type were too restrictive leading
 to failures for other silicons in same family.
 
 The problem was found while testing audio playback on
 AM37x and AM35x processors. But should exist on OMAP36xx
 as well.

Acked-by: Mark Brown broo...@opensource.wolfsonmicro.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] [PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type

2011-05-11 Thread Steve Calfee
On 05/11/11 06:55, Sanjeev Premi wrote:
 Current checks for cpu type were too restrictive leading
 to failures for other silicons in same family.
 
 The problem was found while testing audio playback on
 AM37x and AM35x processors. But should exist on OMAP36xx
 as well.
 
 Signed-off-by: Sanjeev Premi pr...@ti.com
 cc: Mark Brown broo...@opensource.wolfsonmicro.com
 cc: Liam Girdwood l...@ti.com
 cc: Jarkko Nikula jhnik...@gmail.com
 ---
 
  Changes in v4:
Reposting after validating that patch still applies cleanly on
linux-omap master [46966f1]
 
Changed the subject as suggested by Jarkko. Since the subject
has changed, i have omitted v4.
 
  Changes in v3::
None. Reposting[1] after subscribing to alsa-devel list
 
  Changes in v2:
1) Added one more check to the changes.
2) Updated commit message to use plurals.
 
 

Hi,

I removed all but the linux-omap list for my question.

I am trying to get the beagleboardxm to work with an external codec. I
am trying to use a mcbsp1 via the trainer board where it level shifts to
5 volts. I have applied this patch (I am on 2.6.39rc4), but still no
joy. I have a small analyzer attached to the I/O pins and important
things like the bit clock does not wiggle.

First a side question. In the arch/arm/mach-omap2/Kconfig when I select
BEAGLE, it selects OMAP_PACKAGE_CBB - but my bbxm system reference
manual says The BeagleBoard-xM processor is the DM3730CBP 1GHz version
which to me implies the proper package selection should be
OMAP_PACKAGE_CBP. The platform file mux34xx.c has different tables for
them, but I cant quickly tell the difference. Does this matter for mcbspx?

Here is a console dump where I try to aplay a file:
[ 1565.773712] omap_mcbsp_dai_startup: omap-mcbsp-dai.0 bus_id=0 active 0
[ 1565.781829] omap_pcm_open: ret 1
[ 1565.785491] asoc: HiFi - omap-mcbsp-dai.0 info:
[ 1565.790527] asoc: rate mask 0x7fe
[ 1565.794006] asoc: min ch 1 max ch 2
[ 1565.797760] asoc: min rate 8000 max rate 96000
[ 1565.826721] bbxm_hw_params: codec_dai=dfbbb9c0 clk 12288000
[ 1565.832702] bbxm_hw_params 2: codec_dai=dfbbb9c0 clk 12288000
[ 1565.838867] omap_mcbsp_dai_set_dai_fmt: configured 0
[ 1565.844146] bbxm_hw_params 3: codec_dai=dfbbb9c0 clk 12288000
[ 1565.850219] omap_mcbsp_dai_set_dai_sysclk: mcbsp_data=bf00d5b8 in_freq 0
[ 1565.857299] omap_mcbsp_dai_set_dai_sysclk: mcbsp_data=bf00d5b8 in_freq 0
[ 1565.864379] omap_mcbsp_dai_set_dai_sysclk: mcbsp_data=bf00d5b8
in_freq 2048000
[ 1565.877319] max98095 4-0010: read 2a = 10
[ 1565.884277] max98095 4-0010: read 27 = 1
[ 1565.891143] max98095 4-0010: read 2a = 10
[ 1565.898956] max98095 4-0010: read 2e = 0
[ 1565.903198] omap_mcbsp_dai_hw_params: format 1
[ 1565.907958] omap_mcbsp_dai_hw_params: stream Audio Playback
[ 1565.913909] omap_mcbsp_dai_hw_params: framesize 32 in_freq=2048000
div=8 rate=8000
[ 1565.921936] omap-mcbsp omap-mcbsp.1: Configuring McBSP1  phys_base:
0x48074000
[ 1565.929565] omap_pcm_hw_params: ret 0
[ 1565.934722] omap_pcm_prepare: dma_data bf00d4a0
[ 1565.945831] max98095 4-0010: read 91 = 0
[ 1565.950347] max98095 4-0010: write 91 = 3
[ 1565.958618] max98095 4-0010: read 91 = 3
[ 1565.963195] max98095 4-0010: write 91 = c3
[ 1565.972351] snd_pcm_lib_write1: state 2 size 1000
[ 1565.977691] snd_pcm_lib_write1: offset 0
[ 1565.981842] snd_pcm_update_state: stream=0 avail=3000
buffer_size=4000 twake=0 tsleep=1
[ 1565.992706] snd_pcm_lib_write1: state 2 size 1000
[ 1565.997985] snd_pcm_lib_write1: offset 0
[ 1566.002227] snd_pcm_update_state: stream=0 avail=2000
buffer_size=4000 twake=0 tsleep=1
[ 1566.011810] snd_pcm_lib_write1: state 2 size 1000
[ 1566.017120] snd_pcm_lib_write1: offset 0
[ 1566.021270] snd_pcm_update_state: stream=0 avail=1000
buffer_size=4000 twake=0 tsleep=1
[ 1566.033050] snd_pcm_lib_write1: state 2 size 1000
[ 1566.038360] snd_pcm_lib_write1: offset 0
[ 1566.042510] snd_pcm_pre_start: state 3
[ 1566.046447] snd_pcm_do_start: state 3
[ 1566.050292] omap_pcm_trigger: cmd 1
[ 1566.053955] omap_start_dma: lch 0
[ 1566.057891] omap-mcbsp omap-mcbsp.1:  McBSP1 regs 
[ 1566.063629] omap-mcbsp omap-mcbsp.1: DRR2:  0x
[ 1566.068664] omap-mcbsp omap-mcbsp.1: DRR1:  0x
[ 1566.073699] omap-mcbsp omap-mcbsp.1: DXR2:  0x
[ 1566.078735] omap-mcbsp omap-mcbsp.1: DXR1:  0x
[ 1566.083740] omap-mcbsp omap-mcbsp.1: SPCR2: 0x02f5
[ 1566.088775] omap-mcbsp omap-mcbsp.1: SPCR1: 0x0030
[ 1566.093811] omap-mcbsp omap-mcbsp.1: RCR2:  0x8041
[ 1566.098846] omap-mcbsp omap-mcbsp.1: RCR1:  0x0040
[ 1566.103851] omap-mcbsp omap-mcbsp.1: XCR2:  0x8041
[ 1566.108886] omap-mcbsp omap-mcbsp.1: XCR1:  0x0040
[ 1566.113922] omap-mcbsp omap-mcbsp.1: SRGR2: 0x101f
[ 1566.118927] omap-mcbsp omap-mcbsp.1: SRGR1: 0x0f07
[ 1566.123962] omap-mcbsp omap-mcbsp.1: PCR0:  0x0f0f
[ 1566.128997] omap-mcbsp omap-mcbsp.1: ***
[ 1566.134918] snd_pcm_post_start: state 3
[ 1566.138977] snd_pcm_update_state: stream=0 avail=0 buffer_size=4000
twake=0 tsleep=1
[ 

RE: [alsa-devel] [PATCH] ASoC: omap-mcbsp: Remove restrictive checks for cpu type

2011-05-11 Thread Premi, Sanjeev
From: Steve Calfee [stevecal...@gmail.com]
 Sent: Wednesday, May 11, 2011 11:46 PM
 To: Premi, Sanjeev
 Cc: linux-omap@vger.kernel.org; Girdwood, Liam
 Subject: Re: [alsa-devel] [PATCH] ASoC: omap-mcbsp: Remove restrictive checks 
 for cpu type
 

[snip]...[snip]

 
 Hi,
 
 I removed all but the linux-omap list for my question.

[sp] Using a separate thread for this issues would have gotten more eyes!

 
 I am trying to get the beagleboardxm to work with an external codec. I
 am trying to use a mcbsp1 via the trainer board where it level shifts to
 5 volts. I have applied this patch (I am on 2.6.39rc4), but still no
 joy. I have a small analyzer attached to the I/O pins and important
 things like the bit clock does not wiggle.
 
 First a side question. In the arch/arm/mach-omap2/Kconfig when I select
 BEAGLE, it selects OMAP_PACKAGE_CBB - but my bbxm system reference
 manual says The BeagleBoard-xM processor is the DM3730CBP 1GHz version
 which to me implies the proper package selection should be
 OMAP_PACKAGE_CBP. The platform file mux34xx.c has different tables for
 them, but I cant quickly tell the difference. Does this matter for mcbspx?

[sp] Check this page to find the differences:
 
http://processors.wiki.ti.com/index.php/OMAP35x_To_AM37x_Hardware_Migration_Guide

~sanjeev

[snip]...[snip]
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html