From: Violeta Menendez Gonzalez <violeta.menendez@codethink.co.uk>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Ben Dooks <ben.dooks@codethink.co.uk>
Cc: Mark Brown <broonie@kernel.org>,
linux-kernel@lists.codethink.co.uk,
ALSA Development Mailing List <alsa-devel@alsa-project.org>,
linux-sh@vger.kernel.org
Subject: Re: [alsa-devel] r8a7790 only has audio when clock is forced on
Date: Thu, 05 Jun 2014 09:10:05 +0000 [thread overview]
Message-ID: <539033ED.4010604@codethink.co.uk> (raw)
In-Reply-To: <87zjhrj3gc.wl%kuninori.morimoto.gx@renesas.com>
Hi!
On 06/05/14 07:05, Kuninori Morimoto wrote:
>
> Hi Ben
>
> # I misunderstood your point...
>
>> The result of our investigation is as follows:
>>
>> - The clock code correctly enables SSI(ALL) but the audio does not work
>> - If we force SSI(ALL) to be on all the time, we have working audio
>
> SSI(ALL) bit mean "this bit is always required for all SSI"
> If you want to use SSI0, then, you need to enable "SSI(ALL) + SSI0" bit
>
We have to force SSI(ALL) to stay always on on the DT with a special
property, like this:
always-on = <0x00000020>;
we don't need to force SSI0 on, although it is necessary for audio that
this clock is on too.
The code for mstp10 correctly enables SSI0 *and* SSI(ALL). But it only
works when SSI(ALL) is forced on the DT.
When we do on the DT: always-on = <0x00000020>;
we have:
cpg_mstp_clock_endisable: index 5, enable 0
cpg_mstp_clock_endisable: index 5, value read from group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 5, value write in group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 5, enable 1
cpg_mstp_clock_endisable: index 5, value read from group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 5, value write in group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 15, enable 1
cpg_mstp_clock_endisable: index 15, value read from group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 15, value write in group->smstpcr 00027fc0
cpg_mstp_clock_endisable: index 15, enable 0
cpg_mstp_clock_endisable: index 15, value read from group->smstpcr 00027fc0
cpg_mstp_clock_endisable: index 15, value write in group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 5, enable 0
cpg_mstp_clock_endisable: index 5, value read from group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 5, value write in group->smstpcr 0002ffc0
and audio is working correctly.
If we do: always-on = <0x00000000>; (or not having the property at all)
then we have:
cpg_mstp_clock_endisable: index 5, enable 1
cpg_mstp_clock_endisable: index 5, value read from group->smstpcr 0002ffe0
cpg_mstp_clock_endisable: index 5, value write in group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 15, enable 1
cpg_mstp_clock_endisable: index 15, value read from group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 15, value write in group->smstpcr 00027fc0
cpg_mstp_clock_endisable: index 15, enable 0
cpg_mstp_clock_endisable: index 15, value read from group->smstpcr 00027fc0
cpg_mstp_clock_endisable: index 15, value write in group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 5, enable 0
cpg_mstp_clock_endisable: index 5, value read from group->smstpcr 0002ffc0
cpg_mstp_clock_endisable: index 5, value write in group->smstpcr 0002ffe0
and we don't have audio at all.
Where index 5 is SSI(ALL) and index 15 is SSI0.
We can observe that when we force SSI(ALL) on on the DT, then
clock_disable is called for SSI(ALL) before it enables again.
But when we don't force SSI(ALL) to be on, then it only calls
clock_enable, but the register data is the same.
This looks like the correct behaviour, but in one case we have audio,
and in the other we don't.
I hope this clarifies the problem a bit more.
Thanks
--
Violeta Menéndez González http://www.codethink.co.uk/
Software Engineer Codethink - Providing Genius
next prev parent reply other threads:[~2014-06-05 9:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <538E0487.1010700@codethink.co.uk>
2014-06-03 21:42 ` [alsa-devel] r8a7790 only has audio when clock is forced on Mark Brown
2014-06-04 0:26 ` Kuninori Morimoto
2014-06-04 9:02 ` Ben Dooks
2014-06-05 6:05 ` Kuninori Morimoto
2014-06-05 9:10 ` Violeta Menendez Gonzalez [this message]
2014-06-05 9:35 ` Kuninori Morimoto
2014-06-05 9:52 ` Ben Dooks
2014-06-05 10:39 ` Violeta Menendez Gonzalez
2014-06-06 5:54 ` Kuninori Morimoto
2014-06-06 6:42 ` Geert Uytterhoeven
2014-06-04 9:17 ` Violeta Menendez Gonzalez
2014-06-04 9:33 ` Geert Uytterhoeven
2014-06-04 9:38 ` Ben Dooks
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=539033ED.4010604@codethink.co.uk \
--to=violeta.menendez@codethink.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=ben.dooks@codethink.co.uk \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-sh@vger.kernel.org \
/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).