mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Dean Wallace <duffydack73@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	Stable <stable@vger.kernel.org>,
	Johannes Stezenbach <js@sig21.net>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mogens Jensen <mogens-jensen@protonmail.com>
Subject: Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL)
Date: Thu, 1 Nov 2018 14:56:04 +0100	[thread overview]
Message-ID: <a3720a0f-2d6b-f536-a306-df9676bc44a6@redhat.com> (raw)
In-Reply-To: <da025116-580d-e442-d96f-875282306f1b@linux.intel.com>

Hi,

On 31-10-18 23:27, Pierre-Louis Bossart wrote:
> 
>> Just thought it worth mentioning, this new patch that fixes sound
>> again, seems to have ressurected an old issue with PLL unlock.  I'm
>> seeing journal entries after fresh boot ......
>>
>> ```
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard systemd[462]: Started Sound Service.
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> picard kernel: max98090_pll_work: 141 callbacks suppressed
>> picard kernel: max98090 i2c-193C9890:00: PLL unlocked
>> ```
>>
>> sound is ok, but sometimes plugging in headphones spams journal with
>> those PLL messages, and sound turns into "daleks", and I have to
>> remove/insert headphones few times or stop/start audio to fix it.
>> It's a very old issue, maybe you'd know more about it.
> 
> I noticed this error on my Orco device used for tests many moons ago, but I could never find out what led to this error case, it wasn't deterministic and didn't impact the audio quality. All I could do is rate_limit it... If we have an A vs. B situation it'd be really helpful to diagnose further.
> 
> Is there really a causality between the changes from Hans and this PLL unlock error?

That is actually not unlikely. We have the mclk as the source clk for the PLL
and if we enable/disable it and/or change the src-clk then the PLL will loose
its lock and it needs some time to re-lock.

So these errors indicate that we need to either:

1) Sleep a bit after enabling the mclk;
    (and/or after changing the PLL src clk I've not checked if this driver does this)
2) Or poll the PLL locked bit after enabling the mclk until it indicate it has locked
    (and/or after changing the PLL src clk)

I've had to do similar things in u-boot when turning on PLL-s for DRAM and
stuff, so this sounds familiar.

Dean since you have the hardware, this is probably easiest for you to fix
(since you can reproduce the issue) do you feel up to giving fixing this
a shot? I think it is fine if you just go with the simple solution of
adding a msleep(xx) at the right place. I would expect 10 (ms) to do
the trick. If that works you may also try to give 5ms a shot.

Regards,

Hans





  parent reply	other threads:[~2018-11-01 13:56 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181025232517.ywnw54qibemosjws@picard>
2018-10-29 17:45 ` Stephen Boyd
2018-10-29 17:52   ` Andy Shevchenko
2018-10-29 18:04     ` Andy Shevchenko
2018-10-29 19:08       ` Dean Wallace
2018-10-29 22:03         ` Pierre-Louis Bossart
2018-10-30 10:17           ` Hans de Goede
2018-10-30 11:05             ` Hans de Goede
2018-10-30 16:24               ` Andy Shevchenko
2018-10-30 11:19           ` Hans de Goede
2018-10-30 14:38             ` Dean Wallace
2018-10-30 14:48               ` Hans de Goede
2018-10-30 15:03                 ` Andy Shevchenko
2018-10-30 15:25                   ` Pierre-Louis Bossart
2018-10-30 15:04               ` Pierre-Louis Bossart
2018-10-30 15:46                 ` Hans de Goede
2018-10-30 16:02                   ` Hans de Goede
2018-10-30 16:27                     ` Pierre-Louis Bossart
2018-10-30 18:31                       ` Hans de Goede
2018-10-30 16:03                   ` Pierre-Louis Bossart
2018-10-30 16:04                   ` Hans de Goede
2018-10-30 16:15                     ` Dean Wallace
2018-10-31 11:04                       ` Hans de Goede
2018-10-31 12:45                         ` Dean Wallace
2018-10-31 20:07                         ` Dean Wallace
2018-10-31 22:27                           ` Pierre-Louis Bossart
2018-10-31 23:57                             ` Dean Wallace
2018-11-01 10:37                             ` Dean Wallace
2018-11-01 13:57                               ` Hans de Goede
2018-11-01 14:28                                 ` Dean Wallace
2018-11-01 14:49                                   ` Hans de Goede
2018-11-01 15:29                                     ` Dean Wallace
2018-11-01 15:39                                     ` Dean Wallace
2018-11-01 15:50                                     ` Dean Wallace
2018-11-02 10:27                                       ` Hans de Goede
2018-11-02 11:15                                         ` Dean Wallace
2018-11-01 13:56                             ` Hans de Goede [this message]
2018-10-30 18:56                     ` Mogens Jensen
2018-10-30 19:10                       ` Hans de Goede
2018-10-31  6:02                         ` Mogens Jensen
2018-10-31  9:29                           ` Hans de Goede
2018-10-31 10:03                             ` Dean Wallace
2018-11-01  6:55                             ` Mogens Jensen
2018-12-02 12:25                               ` Hans de Goede
2019-01-17  5:58                                 ` Mogens Jensen
2019-01-17  9:12                                   ` Dean Wallace
2019-01-17 12:05                                     ` Hans de Goede
2019-01-17 13:05                                       ` Johannes Stezenbach
2019-01-17 13:16                                       ` Dean Wallace
2019-01-18 15:33                                         ` Hans de Goede
2019-01-17 19:30                                       ` Mogens Jensen
2019-01-18 15:35                                         ` Hans de Goede
2019-01-21  5:55                                           ` Mogens Jensen
2019-01-22 19:27                                             ` Pierre-Louis Bossart
2019-01-25  5:16                                               ` Mogens Jensen
2019-01-25 14:12                                                 ` Pierre-Louis Bossart
2019-01-25 17:57                                                 ` Pierre-Louis Bossart
2019-01-25 20:30                                                   ` Andy Shevchenko
2019-01-24 10:35                                             ` Hans de Goede

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=a3720a0f-2d6b-f536-a306-df9676bc44a6@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=duffydack73@gmail.com \
    --cc=js@sig21.net \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mogens-jensen@protonmail.com \
    --cc=mturquette@baylibre.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sboyd@kernel.org \
    --cc=stable@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

all inboxes | Powered by JetHome®