<span></span>These patches apply cleanly to 'v2.6.37' <br>3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5<br><div id=":1ma"><div>
of git://<a href="http://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git" target="_blank">git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci.git</a>.<br><br>The kernel was built with the 'da8xx_omapl_defconfig' from the omap-l1tree,<br>
and 'make menuconfig' to enable ASoC (the defconfig already has<br>CONFIG_REGULATOR=y, CONFIG_REGULATOR_DUMMY=y, and<br>CONFIG_REGULATOR_TPS6507X=y).<br>
<br>
T<span>esting was done</span> on a da850evm by tftp'ing the kernel into ram, and using the <br>SPI-flash-based rootfs from the PSP that shipped with the board.<br><br>Using 'arecord -r 48000 -c 2 -f S32_BE -t raw -v -d 1 > /tmp/arecord.cap' produced<br>
a file of 384000 bytes (48000 x 2 x 4 bytes/sample). <br>'arecord -r 48000 -c 2 -f S32_BE -t raw -v > /dev/null' ran flawlessly for several hours.<br><br>I was not able to reproduce Sudhakar's problems with 'arecord -f dat | aplay -f dat'.<br>
<br><span>Tested</span>-<span>by</span>: <span>Dan Sharon </span><<a href="mailto:bengardiner@nanometrics.ca" target="_blank">dansharon@nanometrics.ca</a>><br>
<br>Regards,<br><font color="#888888">
<span>Dan Sharon</span></font></div></div><br><br><div class="gmail_quote">On Mon, Jan 17, 2011 at 11:43 PM, Rajashekhara, Sudhakar <span dir="ltr"><<a href="mailto:sudhakar.raj@ti.com">sudhakar.raj@ti.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Resending with proper $SUBJECT...<br>
<br>
Hi,<br>
<br>
I was testing Audio with 2.6.37 on DA850 from Kevin Hilman Linux tree<br>
at [1] and found that audio is broken. Below patch fixes the issue.<br>
<br>
---<br>
From: Rajashekhara, Sudhakar <<a href="mailto:sudhakar.raj@ti.com">sudhakar.raj@ti.com</a>><br>
<br>
davinci: fixes for audio on da850/omap-l138/am18x<br>
<br>
On DA850/OMAP-L138/AM18x, AIC3x codec is at 0x18 slave address.<br>
But in sound/soc/davinci/davinci-evm.c file, "struct snd_soc_dai_link"<br>
has the wrong AIC3x codec slave address. This patch fixes this issue.<br>
<br>
Also, this patch registers the platform device for davinci-pcm-audio.<br>
<br>
Signed-off-by: Rajashekhara, Sudhakar <<a href="mailto:sudhakar.raj@ti.com">sudhakar.raj@ti.com</a>><br>
---<br>
arch/arm/mach-davinci/devices-da8xx.c | 12 ++++++++++++<br>
sound/soc/davinci/davinci-evm.c | 2 +-<br>
2 files changed, 13 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c<br>
index 9eec630..17c0dbc 100644<br>
--- a/arch/arm/mach-davinci/devices-da8xx.c<br>
+++ b/arch/arm/mach-davinci/devices-da8xx.c<br>
@@ -473,6 +473,11 @@ static struct resource da850_mcasp_resources[] = {<br>
},<br>
};<br>
<br>
+struct platform_device davinci_pcm_device = {<br>
+ .name = "davinci-pcm-audio",<br>
+ .id = -1,<br>
+};<br>
+<br>
static struct platform_device da850_mcasp_device = {<br>
.name = "davinci-mcasp",<br>
.id = 0,<br>
@@ -480,8 +485,15 @@ static struct platform_device da850_mcasp_device = {<br>
.resource = da850_mcasp_resources,<br>
};<br>
<br>
+static void davinci_init_pcm(void)<br>
+{<br>
+ platform_device_register(&davinci_pcm_device);<br>
+}<br>
+<br>
void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata)<br>
{<br>
+ davinci_init_pcm();<br>
+<br>
/* DA830/OMAP-L137 has 3 instances of McASP */<br>
if (cpu_is_davinci_da830() && id == 1) {<br>
da830_mcasp1_device.dev.platform_data = pdata;<br>
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c<br>
index bc9e6b0..07db881 100644<br>
--- a/sound/soc/davinci/davinci-evm.c<br>
+++ b/sound/soc/davinci/davinci-evm.c<br>
@@ -224,7 +224,7 @@ static struct snd_soc_dai_link da8xx_evm_dai = {<br>
.stream_name = "AIC3X",<br>
.cpu_dai_name= "davinci-mcasp.0",<br>
.codec_dai_name = "tlv320aic3x-hifi",<br>
- .codec_name = "tlv320aic3x-codec.0-001a",<br>
+ .codec_name = "tlv320aic3x-codec.1-0018",<br>
.platform_name = "davinci-pcm-audio",<br>
.init = evm_aic3x_init,<br>
.ops = &evm_ops,<br>
---<br>
<br>
Also, I found that either CONFIG_REGULATOR should not be defined or if<br>
CONFIG_REGULATOR is defined then CONFIG_REGULATOR_DUMMY should also be<br>
defined. Without this menuconfig fix, Soundcard does not get detected.<br>
<br>
With the above fixes, arecord and aplay does not work for the first time.<br>
Couple of times I get the below error:<br>
<br>
root@da850-omapl138-evm:~# arecord -f dat | aplay -f dat<br>
arecord: main:608: audio open error: Invalid argument<br>
aplay: playback:2297: read error<br>
root@da850-omapl138-evm:~# arecord -f dat | aplay -f dat<br>
aplay: main:608: audio open error: Invalid argument<br>
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo<br>
<br>
Third time arecord and aplay work normally.<br>
<br>
Has anyone seen such issues on DA850 or any other platform?<br>
<br>
I am currently debugging this issue. I'll submit the above patch to community<br>
once the issue of fixed.<br>
<br>
[1] <a href="http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=summary" target="_blank">http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=summary</a><br>
<br>
Regards,<br>
Sudhakar<br>
_______________________________________________<br>
Davinci-linux-open-source mailing list<br>
<a href="mailto:Davinci-linux-open-source@linux.davincidsp.com">Davinci-linux-open-source@linux.davincidsp.com</a><br>
<a href="http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source" target="_blank">http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source</a><br>
_______________________________________________<br>
Davinci-linux-open-source mailing list<br>
<a href="mailto:Davinci-linux-open-source@linux.davincidsp.com">Davinci-linux-open-source@linux.davincidsp.com</a><br>
<a href="http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source" target="_blank">http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source</a><br>
</blockquote></div><br>