All of lore.kernel.org
 help / color / mirror / Atom feed
From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: Dove: Add the audio device to the Cubox DT
Date: Thu, 26 Sep 2013 14:42:23 +0200	[thread overview]
Message-ID: <52442BAF.6090006@gmail.com> (raw)
In-Reply-To: <20130926132859.04ad4407@armhf>

On 09/26/2013 01:28 PM, Jean-Francois Moine wrote:
> On Thu, 26 Sep 2013 10:31:10 +0200
> Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> wrote:
>
>> On 09/26/2013 10:11 AM, Jean-Francois Moine wrote:
>>> In the Cubox, I changed the audio DT to:
>>>
>>> &i2s1 {
>>> 	status = "okay";
>>> 	clocks = <&gate_clk 13>, <&si5351 1>;
>>> 	clock-names = "internal", "extclk";
>>> 	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_gpio_13_audio1>;
>>
>> Have you checked that pinmux was configured correctly?
>>
>> You are missing a
>>
>> pinctrl-names = "default";
>>
>> to actually execute the above pinmux setting.
>
> Thanks, the pinmux was not set correctly, and I added the "default".
>
> 	[snip]
>> What about trying to get 48kHz working first? Does it work with
>> internal DCO and 48kHz? External audio clock should be 256*fs as stated
>> in dove datasheet.
>
> I have no input with 48kHz.

Or 44k1, just something that works with internal dco. kirkwood-i2s
should request 256*fs, or 11289600 Hz for 44k1 audio rate from external
clock.

>>> For more information, I use i2s input in the tda998x with audio rate
>>> 96kHz on HDMI output. The sound is fine with the internal dco (tested
>>> with 44.1kHz only).
>>
>> Sorry, I don't understand the above "information". How can you have a
>> different input audio rate tested with 44k1 output rate?
>
> The internal dco permits only 44.1, 44 and 96 kHz, so, vlc translates
> the input rates smaller than 44.1 kHz to 44.1 kHz.

So you are actually testing 44k1 in any case. Let's stick with 44k1 for
now.

>> Have you ever tested your audio equipment with something different than
>> 48k and 44k1 SPDIF PCM? Are you actually sure it works at all, i.e. do
>> you have different audio source with SPDIF >48kHz? Can you try optical
>> SPDIF instead of HDMI?
>>
>> Just try to narrow it down, currently I cannot see why this behavior
>> should be limited to either si5351 or dove audio alone.
>
> I have no optical S/PDIF.

Ok, but 44k1 works with HDMI, we try to reproduce 44k1 with external
clock now.

> Well, I did more tests:
>
> - i2s or s/pdif input by the tda998x work fine with the internal dco

Ok.

> - the pinmux seems correct:
>
> device f10b4000.audio-controller
> state default
> type MUX_GROUP (2)
> controlling device f10d0200.pin-ctrl
> group mpp_audio1
> function i2s1/spdifo
>
> device f10b4000.audio-controller
> state default
> type MUX_GROUP (2)
> controlling device f10d0200.pin-ctrl
> group mpp13
> function audio1
>
> - I tried both <&si5351 1> and <&si5351 2>, and I get no sound with the
>    external clock.
>
> - when running vlc with the external clock, the flux towards the
>    kirkwood driver is blocked and there is no sound interrupt.
>
>   47:          0  main-interrupt-ctrl  21  kirkwood-i2s

Can you add "usleep_range(10000, 12000);" after clk_set_rate(extclk) in
kirkwood-i2s. That should be enough to get around any issues with
external clock not being stable. I will look up real requirements for
si5351 later (and actually this should move to clk-si5351.c later too).

Please make sure, you stick with 44k1 (or something that works with
DCO).

Sebastian

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Ian Campbell
	<ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>,
	Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] ARM: Dove: Add the audio device to the Cubox DT
Date: Thu, 26 Sep 2013 14:42:23 +0200	[thread overview]
Message-ID: <52442BAF.6090006@gmail.com> (raw)
In-Reply-To: <20130926132859.04ad4407@armhf>

On 09/26/2013 01:28 PM, Jean-Francois Moine wrote:
> On Thu, 26 Sep 2013 10:31:10 +0200
> Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> On 09/26/2013 10:11 AM, Jean-Francois Moine wrote:
>>> In the Cubox, I changed the audio DT to:
>>>
>>> &i2s1 {
>>> 	status = "okay";
>>> 	clocks = <&gate_clk 13>, <&si5351 1>;
>>> 	clock-names = "internal", "extclk";
>>> 	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_gpio_13_audio1>;
>>
>> Have you checked that pinmux was configured correctly?
>>
>> You are missing a
>>
>> pinctrl-names = "default";
>>
>> to actually execute the above pinmux setting.
>
> Thanks, the pinmux was not set correctly, and I added the "default".
>
> 	[snip]
>> What about trying to get 48kHz working first? Does it work with
>> internal DCO and 48kHz? External audio clock should be 256*fs as stated
>> in dove datasheet.
>
> I have no input with 48kHz.

Or 44k1, just something that works with internal dco. kirkwood-i2s
should request 256*fs, or 11289600 Hz for 44k1 audio rate from external
clock.

>>> For more information, I use i2s input in the tda998x with audio rate
>>> 96kHz on HDMI output. The sound is fine with the internal dco (tested
>>> with 44.1kHz only).
>>
>> Sorry, I don't understand the above "information". How can you have a
>> different input audio rate tested with 44k1 output rate?
>
> The internal dco permits only 44.1, 44 and 96 kHz, so, vlc translates
> the input rates smaller than 44.1 kHz to 44.1 kHz.

So you are actually testing 44k1 in any case. Let's stick with 44k1 for
now.

>> Have you ever tested your audio equipment with something different than
>> 48k and 44k1 SPDIF PCM? Are you actually sure it works at all, i.e. do
>> you have different audio source with SPDIF >48kHz? Can you try optical
>> SPDIF instead of HDMI?
>>
>> Just try to narrow it down, currently I cannot see why this behavior
>> should be limited to either si5351 or dove audio alone.
>
> I have no optical S/PDIF.

Ok, but 44k1 works with HDMI, we try to reproduce 44k1 with external
clock now.

> Well, I did more tests:
>
> - i2s or s/pdif input by the tda998x work fine with the internal dco

Ok.

> - the pinmux seems correct:
>
> device f10b4000.audio-controller
> state default
> type MUX_GROUP (2)
> controlling device f10d0200.pin-ctrl
> group mpp_audio1
> function i2s1/spdifo
>
> device f10b4000.audio-controller
> state default
> type MUX_GROUP (2)
> controlling device f10d0200.pin-ctrl
> group mpp13
> function audio1
>
> - I tried both <&si5351 1> and <&si5351 2>, and I get no sound with the
>    external clock.
>
> - when running vlc with the external clock, the flux towards the
>    kirkwood driver is blocked and there is no sound interrupt.
>
>   47:          0  main-interrupt-ctrl  21  kirkwood-i2s

Can you add "usleep_range(10000, 12000);" after clk_set_rate(extclk) in
kirkwood-i2s. That should be enough to get around any issues with
external clock not being stable. I will look up real requirements for
si5351 later (and actually this should move to clk-si5351.c later too).

Please make sure, you stick with 44k1 (or something that works with
DCO).

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: linux-arm-kernel@lists.infradead.org,
	Jason Cooper <jason@lakedaemon.net>,
	Rob Herring <rob.herring@calxeda.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Russell King <linux@arm.linux.org.uk>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ARM: Dove: Add the audio device to the Cubox DT
Date: Thu, 26 Sep 2013 14:42:23 +0200	[thread overview]
Message-ID: <52442BAF.6090006@gmail.com> (raw)
In-Reply-To: <20130926132859.04ad4407@armhf>

On 09/26/2013 01:28 PM, Jean-Francois Moine wrote:
> On Thu, 26 Sep 2013 10:31:10 +0200
> Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> wrote:
>
>> On 09/26/2013 10:11 AM, Jean-Francois Moine wrote:
>>> In the Cubox, I changed the audio DT to:
>>>
>>> &i2s1 {
>>> 	status = "okay";
>>> 	clocks = <&gate_clk 13>, <&si5351 1>;
>>> 	clock-names = "internal", "extclk";
>>> 	pinctrl-0 = <&pmx_audio1_i2s1_spdifo &pmx_gpio_13_audio1>;
>>
>> Have you checked that pinmux was configured correctly?
>>
>> You are missing a
>>
>> pinctrl-names = "default";
>>
>> to actually execute the above pinmux setting.
>
> Thanks, the pinmux was not set correctly, and I added the "default".
>
> 	[snip]
>> What about trying to get 48kHz working first? Does it work with
>> internal DCO and 48kHz? External audio clock should be 256*fs as stated
>> in dove datasheet.
>
> I have no input with 48kHz.

Or 44k1, just something that works with internal dco. kirkwood-i2s
should request 256*fs, or 11289600 Hz for 44k1 audio rate from external
clock.

>>> For more information, I use i2s input in the tda998x with audio rate
>>> 96kHz on HDMI output. The sound is fine with the internal dco (tested
>>> with 44.1kHz only).
>>
>> Sorry, I don't understand the above "information". How can you have a
>> different input audio rate tested with 44k1 output rate?
>
> The internal dco permits only 44.1, 44 and 96 kHz, so, vlc translates
> the input rates smaller than 44.1 kHz to 44.1 kHz.

So you are actually testing 44k1 in any case. Let's stick with 44k1 for
now.

>> Have you ever tested your audio equipment with something different than
>> 48k and 44k1 SPDIF PCM? Are you actually sure it works at all, i.e. do
>> you have different audio source with SPDIF >48kHz? Can you try optical
>> SPDIF instead of HDMI?
>>
>> Just try to narrow it down, currently I cannot see why this behavior
>> should be limited to either si5351 or dove audio alone.
>
> I have no optical S/PDIF.

Ok, but 44k1 works with HDMI, we try to reproduce 44k1 with external
clock now.

> Well, I did more tests:
>
> - i2s or s/pdif input by the tda998x work fine with the internal dco

Ok.

> - the pinmux seems correct:
>
> device f10b4000.audio-controller
> state default
> type MUX_GROUP (2)
> controlling device f10d0200.pin-ctrl
> group mpp_audio1
> function i2s1/spdifo
>
> device f10b4000.audio-controller
> state default
> type MUX_GROUP (2)
> controlling device f10d0200.pin-ctrl
> group mpp13
> function audio1
>
> - I tried both <&si5351 1> and <&si5351 2>, and I get no sound with the
>    external clock.
>
> - when running vlc with the external clock, the flux towards the
>    kirkwood driver is blocked and there is no sound interrupt.
>
>   47:          0  main-interrupt-ctrl  21  kirkwood-i2s

Can you add "usleep_range(10000, 12000);" after clk_set_rate(extclk) in
kirkwood-i2s. That should be enough to get around any issues with
external clock not being stable. I will look up real requirements for
si5351 later (and actually this should move to clk-si5351.c later too).

Please make sure, you stick with 44k1 (or something that works with
DCO).

Sebastian

  reply	other threads:[~2013-09-26 12:42 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28  9:35 [PATCH 2/2] ARM: Dove: Add the audio device to the Cubox DT Jean-Francois Moine
2013-08-28  9:35 ` Jean-Francois Moine
2013-08-28 10:14 ` Sebastian Hesselbarth
2013-08-28 10:14   ` Sebastian Hesselbarth
2013-08-31 10:51   ` Jean-Francois Moine
2013-08-31 10:51     ` Jean-Francois Moine
2013-08-31 11:24     ` Russell King - ARM Linux
2013-08-31 11:24       ` Russell King - ARM Linux
2013-08-31 11:24       ` Russell King - ARM Linux
2013-08-31 11:55       ` Jean-Francois Moine
2013-08-31 11:55         ` Jean-Francois Moine
2013-08-31 12:17         ` Russell King - ARM Linux
2013-08-31 12:17           ` Russell King - ARM Linux
2013-08-31 12:17           ` Russell King - ARM Linux
2013-09-01  7:04       ` Jean-Francois Moine
2013-09-01  7:04         ` Jean-Francois Moine
2013-09-01  9:26     ` Sebastian Hesselbarth
2013-09-01  9:26       ` Sebastian Hesselbarth
2013-09-01  9:26       ` Sebastian Hesselbarth
2013-09-01 11:23       ` Jean-Francois Moine
2013-09-26  8:11       ` Jean-Francois Moine
2013-09-26  8:11         ` Jean-Francois Moine
2013-09-26  8:11         ` Jean-Francois Moine
2013-09-26  8:31         ` Sebastian Hesselbarth
2013-09-26  8:31           ` Sebastian Hesselbarth
2013-09-26 11:28           ` Jean-Francois Moine
2013-09-26 11:28             ` Jean-Francois Moine
2013-09-26 11:28             ` Jean-Francois Moine
2013-09-26 12:42             ` Sebastian Hesselbarth [this message]
2013-09-26 12:42               ` Sebastian Hesselbarth
2013-09-26 12:42               ` Sebastian Hesselbarth
2013-09-28 14:27             ` Sebastian Hesselbarth
2013-09-28 14:27               ` Sebastian Hesselbarth
2013-09-28 14:27               ` Sebastian Hesselbarth
2013-10-03 16:17               ` Jean-Francois Moine
2013-10-03 16:17                 ` Jean-Francois Moine
2013-10-03 16:17                 ` Jean-Francois Moine
2013-10-08 16:11                 ` Jason Cooper
2013-10-08 16:11                   ` Jason Cooper
2013-10-08 16:11                   ` Jason Cooper
2013-10-08 17:59                   ` Jean-Francois Moine
2013-10-08 17:59                     ` Jean-Francois Moine
2013-10-08 17:59                     ` Jean-Francois Moine
2013-10-08 18:00                     ` Jason Cooper
2013-10-08 18:00                       ` Jason Cooper
2013-10-08 18:00                       ` Jason Cooper

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=52442BAF.6090006@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.