alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Ziegler <patrick.ziegler@fh-kl.de>
To: alsa-devel@alsa-project.org
Cc: Ryan Mallon <ryan@bluewatersys.com>
Subject: Re: Channel swapping problem on Atmel SSC audio
Date: Fri, 12 Nov 2010 09:06:10 +0100	[thread overview]
Message-ID: <4CDCF572.9050808@fh-kl.de> (raw)
In-Reply-To: <201011111227.09633.gineera@aspect135.co.uk>



Am 11.11.2010 13:27, schrieb Alan Horstmann:
> On Wednesday 10 November 2010 22:49, Ryan Mallon wrote:
>    
>> I'm working on a custom board using the AT91SAM9G45 processor and a
>> TLV320AIC26 SPI attached audio codec using I2S format audio. When doing
>> audio playback on the board the left and right channels are occasionally
>> flipped.
>>      
> <snip>
>
>    
>> Has anybody else had this problem, or does anybody have any AT91/Atmel
>> hardware that they could test to see if it occurs on other hardware also?
>>      
> I have worked with the AT91SAM9260 on a project which is currently suspended
> (other priorities), where we had a simiar problem, with a codec on SPI.
> Every time audio was started (capture or playback) the channels could be
> swapped.  Solving that issue remains TODO when we restart.
>
> There was a thread on alsa-devel last month 'Soc Atmel SSC stereo problem'
> with some suggestions.
>
>    
In the thread mentioned, Alan proposed me amongst other things to test 
the LRCK level before starting the SSC. This works well for me. Maybe it 
should be implemented in a more generic way but the following 
modification does the trick for me.

in function  atmel_pcm_trigger inside file sound/soc/atmel/atmel-pcm.c :

case SNDRV_PCM_TRIGGER_START:
+while(!at91_get_gpio_value(AT91_PIN_PB12));
+while(at91_get_gpio_value(AT91_PIN_PB12));

case SNDRV_PCM_TRIGGER_RESUME:
+while(!at91_get_gpio_value(AT91_PIN_PB12));
+while(at91_get_gpio_value(AT91_PIN_PB12));

Patrick

-- 

Dipl.-Inf. (FH) Patrick Ziegler

University Of Applied Sciences
Kaiserslautern

Amerikastrasse 1
D-66482 Zweibruecken
Germany

Phone:	+49 631 3724 5526
Mail:	patrick.ziegler@fh-kl.de

http://www.fh-kl.de
http://www.fh-kl.de/fachbereiche/imst/iuk-knowhow.html

  reply	other threads:[~2010-11-12  8:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 22:49 Channel swapping problem on Atmel SSC audio Ryan Mallon
2010-11-11 12:27 ` Alan Horstmann
2010-11-12  8:06   ` Patrick Ziegler [this message]
2010-11-12  9:52     ` Irfan Shaikh
2010-11-14 20:37       ` Ryan Mallon
  -- strict thread matches above, loose matches on Subject: below --
2011-02-17 13:45 Jason Fox
2011-02-18  7:06 ` Peter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CDCF572.9050808@fh-kl.de \
    --to=patrick.ziegler@fh-kl.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=ryan@bluewatersys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).