* Artifacts present in AIC23 capture for 48 KHz sampling rate
@ 2009-11-06 12:54 Aggarwal, Anuj
0 siblings, 0 replies; 5+ messages in thread
From: Aggarwal, Anuj @ 2009-11-06 12:54 UTC (permalink / raw)
To: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
Hi,
I am observing artifacts (sharp spikes at fixed intervals) while capturing audio on AM3517 EVM and AIC23 codec. They are present only in one of the channels when I am capturing at 48 KHz. All other sampling rates are working fine with the above said combination.
I have also attached the screenshot taken with the help of Audacity utility. Here, I tried recording silence but artifacts were observed on one channel.
Has anyone also observed the similar behavior with AIC23 codec? Any hints what could be the root cause?
Regards,
Anuj Aggarwal
[-- Attachment #2: audio_artifacts.PNG --]
[-- Type: image/png, Size: 59313 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Artifacts present in AIC23 capture for 48 KHz sampling rate
@ 2009-11-06 12:57 Aggarwal, Anuj
0 siblings, 0 replies; 5+ messages in thread
From: Aggarwal, Anuj @ 2009-11-06 12:57 UTC (permalink / raw)
To: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
Hi,
I am observing artifacts (sharp spikes at fixed intervals) while
capturing audio on AM3517 EVM and AIC23 codec. They are present only
in one of the channels when I am capturing at 48 KHz. All other
sampling rates are working fine with the above said combination.
I have also attached the screenshot taken with the help of Audacity
utility. Here, I tried recording silence but artifacts were observed
on one channel.
Has anyone also observed the similar behavior with AIC23 codec? Any
hints on what could be the root cause?
Regards,
Anuj Aggarwal
[-- Attachment #2: audio_artifacts.PNG --]
[-- Type: image/png, Size: 59313 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Artifacts present in AIC23 capture for 48 KHz sampling rate
@ 2009-11-17 13:15 Aggarwal, Anuj
2009-11-17 19:09 ` Troy Kisky
0 siblings, 1 reply; 5+ messages in thread
From: Aggarwal, Anuj @ 2009-11-17 13:15 UTC (permalink / raw)
To: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
Cc: troy.kisky@boundarydevices.com
> -----Original Message-----
> From: Aggarwal, Anuj
> Sent: Friday, November 06, 2009 6:28 PM
> To: alsa-devel@alsa-project.org; 'linux-omap@vger.kernel.org'
> Subject: Artifacts present in AIC23 capture for 48 KHz sampling rate
>
> Hi,
>
> I am observing artifacts (sharp spikes at fixed intervals) while
> capturing audio on AM3517 EVM and AIC23 codec. They are present only
> in one of the channels when I am capturing at 48 KHz. All other
> sampling rates are working fine with the above said combination.
>
> I have also attached the screenshot taken with the help of Audacity
> utility. Here, I tried recording silence but artifacts were observed
> on one channel.
>
> Has anyone also observed the similar behavior with AIC23 codec? Any
> hints on what could be the root cause?
[Aggarwal, Anuj] On further debugging, I found that the function
find_rate() in sound/soc/codecs/tlv320aic23.c is not returning
the correct value for capture in 48KHz sample rate. In USB mode
(MCLK=12MHz), for 48KHz, it returns 0x7D (CLKOUT=0, CLKIN=1,
SR[3:0]=0xF, BOSR=1, Normal=1) whereas as per the AIC23B spec,
it should have been 0x5D (CLKOUT=0, CLKIN=1, SR[3:0]=0x7,
BOSR=1, Normal=1). When I forcefully write the above said value
to the Sample Rate Control register, things work fine for me
for 48KHz capture.
Is my understanding correct for this problem? Can someone help
me understand how the function calculates the appropriate value?
>
> Regards,
> Anuj Aggarwal
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Artifacts present in AIC23 capture for 48 KHz sampling rate
2009-11-17 13:15 Artifacts present in AIC23 capture for 48 KHz sampling rate Aggarwal, Anuj
@ 2009-11-17 19:09 ` Troy Kisky
2009-11-18 9:20 ` Aggarwal, Anuj
0 siblings, 1 reply; 5+ messages in thread
From: Troy Kisky @ 2009-11-17 19:09 UTC (permalink / raw)
To: Aggarwal, Anuj; +Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
Aggarwal, Anuj wrote:
>> -----Original Message-----
>> From: Aggarwal, Anuj
>> Sent: Friday, November 06, 2009 6:28 PM
>> To: alsa-devel@alsa-project.org; 'linux-omap@vger.kernel.org'
>> Subject: Artifacts present in AIC23 capture for 48 KHz sampling rate
>>
>> Hi,
>>
>> I am observing artifacts (sharp spikes at fixed intervals) while
>> capturing audio on AM3517 EVM and AIC23 codec. They are present only
>> in one of the channels when I am capturing at 48 KHz. All other
>> sampling rates are working fine with the above said combination.
>>
>> I have also attached the screenshot taken with the help of Audacity
>> utility. Here, I tried recording silence but artifacts were observed
>> on one channel.
>>
>> Has anyone also observed the similar behavior with AIC23 codec? Any
>> hints on what could be the root cause?
> [Aggarwal, Anuj] On further debugging, I found that the function
> find_rate() in sound/soc/codecs/tlv320aic23.c is not returning
> the correct value for capture in 48KHz sample rate. In USB mode
> (MCLK=12MHz), for 48KHz, it returns 0x7D (CLKOUT=0, CLKIN=1,
> SR[3:0]=0xF, BOSR=1, Normal=1) whereas as per the AIC23B spec,
0x7D would be BOSR = 0, USB/NORMAL = 1, SR=0xff, div2 = 1
The bug is with sr_valid_mask,
static const unsigned short sr_valid_mask[] = {
LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/
LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/
LOWER_GROUP, /* Usb, bosr - 0*/
UPPER_GROUP, /* Usb, bosr - 1*/
};
should be
static const unsigned short sr_valid_mask[] = {
LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/
LOWER_GROUP, /* Usb, bosr - 0*/
LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/
UPPER_GROUP, /* Usb, bosr - 1*/
};
Can you give this a try and let me know?
Thanks
Troy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Artifacts present in AIC23 capture for 48 KHz sampling rate
2009-11-17 19:09 ` Troy Kisky
@ 2009-11-18 9:20 ` Aggarwal, Anuj
0 siblings, 0 replies; 5+ messages in thread
From: Aggarwal, Anuj @ 2009-11-18 9:20 UTC (permalink / raw)
To: Troy Kisky; +Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
> -----Original Message-----
> From: Troy Kisky [mailto:troy.kisky@boundarydevices.com]
> Sent: Wednesday, November 18, 2009 12:39 AM
> To: Aggarwal, Anuj
> Cc: alsa-devel@alsa-project.org; linux-omap@vger.kernel.org
> Subject: Re: [alsa-devel] Artifacts present in AIC23 capture for 48 KHz
> sampling rate
>
> Aggarwal, Anuj wrote:
> >> -----Original Message-----
> >> From: Aggarwal, Anuj
> >> Sent: Friday, November 06, 2009 6:28 PM
> >> To: alsa-devel@alsa-project.org; 'linux-omap@vger.kernel.org'
> >> Subject: Artifacts present in AIC23 capture for 48 KHz sampling rate
> >>
> >> Hi,
> >>
> >> I am observing artifacts (sharp spikes at fixed intervals) while
> >> capturing audio on AM3517 EVM and AIC23 codec. They are present only
> >> in one of the channels when I am capturing at 48 KHz. All other
> >> sampling rates are working fine with the above said combination.
> >>
> >> I have also attached the screenshot taken with the help of Audacity
> >> utility. Here, I tried recording silence but artifacts were observed
> >> on one channel.
> >>
> >> Has anyone also observed the similar behavior with AIC23 codec? Any
> >> hints on what could be the root cause?
> > [Aggarwal, Anuj] On further debugging, I found that the function
> > find_rate() in sound/soc/codecs/tlv320aic23.c is not returning
> > the correct value for capture in 48KHz sample rate. In USB mode
> > (MCLK=12MHz), for 48KHz, it returns 0x7D (CLKOUT=0, CLKIN=1,
> > SR[3:0]=0xF, BOSR=1, Normal=1) whereas as per the AIC23B spec,
>
> 0x7D would be BOSR = 0, USB/NORMAL = 1, SR=0xff, div2 = 1
>
> The bug is with sr_valid_mask,
>
> static const unsigned short sr_valid_mask[] = {
> LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/
> LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/
> LOWER_GROUP, /* Usb, bosr - 0*/
> UPPER_GROUP, /* Usb, bosr - 1*/
> };
>
> should be
>
> static const unsigned short sr_valid_mask[] = {
> LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/
> LOWER_GROUP, /* Usb, bosr - 0*/
> LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/
> UPPER_GROUP, /* Usb, bosr - 1*/
> };
>
>
> Can you give this a try and let me know?
[Aggarwal, Anuj] I tried this on AM3517 EVM + AIC23B; it works
fine for me. But I have tested the fix only with a 12 MHz clock.
Thanks for quickly fixing this.
>
> Thanks
> Troy
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-18 9:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-17 13:15 Artifacts present in AIC23 capture for 48 KHz sampling rate Aggarwal, Anuj
2009-11-17 19:09 ` Troy Kisky
2009-11-18 9:20 ` Aggarwal, Anuj
-- strict thread matches above, loose matches on Subject: below --
2009-11-06 12:57 Aggarwal, Anuj
2009-11-06 12:54 Aggarwal, Anuj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox