Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Ziegler <patrick.ziegler@fh-kl.de>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: SoC Atmel SSC stereo problem
Date: Fri, 22 Oct 2010 23:39:01 +0200	[thread overview]
Message-ID: <4CC20475.3020900@fh-kl.de> (raw)
In-Reply-To: <4CC1B7CD.3030703@ladisch.de>


>> I have some trouble with stereo audio through the atmal ssc interface
>> based on at91-ssc.c.
> (Merged into atmel_ssc_dai.c since about one year ago.)
>> Unfortunately left and right channels were swapped periodically.
>>
>> In my environment the codec supplies the BLCK and LRC clocks and
>> the SSC is configured to transmit one sample on both edges of the LRC clock.
>> But I guess the audio frames will always start with a frame of the left channel
>> while the LRC clock is in an undefined state.
> Indeed.
>
>> How does normally the audio driver detect when a left and when a right channel
>> frame should be send and with which it should start ?
> The driver cannot do anything about this; the hardware must be told
> to start transmitting at the falling edge.
>
> If possible.
If there is only one channel to transfer, I set the start of 
transmission on the rising edge (left justified format). But if I do 
this for two channels, both channels will be transmit on the left 
channel, this is what I would expect. Is there way to tell the hardware 
(Atmel SSC on at91rm9200) that 2 Frames shall be send after a rising 
edge with an indication that the second frame shall be send after the 
falling edge ? This is the way it should work, but of course I don't 
know if it's even possible.
> Is there a reason why the codec supplies LRC?
>
The SSC is connected to a FPGA that assigns the bus to different devices 
depending on the application. And for all applications the FPGA 
generates the clocks. Maybe this is not the best solution but I will try 
to deal with this limitation first before I try to persuade other people 
to change it.

  reply	other threads:[~2010-10-22 21:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 15:17 SoC Atmel SSC stereo problem Patrick Ziegler
2010-10-22 16:11 ` Clemens Ladisch
2010-10-22 21:39   ` Patrick Ziegler [this message]
2010-10-23  4:10     ` Alex
2010-10-25  9:16       ` Patrick Ziegler

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=4CC20475.3020900@fh-kl.de \
    --to=patrick.ziegler@fh-kl.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    /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