alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Paulo Sergio <pstglia@gmail.com>
Cc: alsa-devel@alsa-project.org, vinod.koul@intel.com,
	broonie@opensource.wolfsonmicro.com,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Android-x86 development <android-x86-devel@googlegroups.com>,
	Chih-Wei Huang <cwhuang@android-x86.org>,
	mika.westerberg@linux.intel.com
Subject: Re: WM5102 - Help to make baytrail machine driver work
Date: Mon, 15 May 2017 13:02:55 +0100	[thread overview]
Message-ID: <20170515120255.GL1594@localhost.localdomain> (raw)
In-Reply-To: <CAJcYhpatsrYyC0CRu-0quA0=NYOObMC2nro5sDE-2ssTTu83rA@mail.gmail.com>

On Sat, May 13, 2017 at 02:11:31AM -0300, Paulo Sergio wrote:
> Remarks:
> 
> * setting pll/fll using snd_soc_dai_set_pll didn't work. I had to map
> the codec member from snd_soc_dai struct and use
>    snd_soc_codec_set_pll instead (used the same constants used on
> Lenovo source code)
> 

Yes this is correct you will need to call snd_soc_codec_set_pll
to configure the FLLs on the chip. As the FLLs are not tied to a
particular DAI it doesn't really make sense to configure them
from dai_set_pll.

>  - Had also to set sysclk to  codecs, not only to dai's using
> snd_soc_codec_set_sysclk
> 

Again this also makes sense snd_soc_codec_set_sysclk is how you
configure the sysclk on this device. Again here the sysclk is
chip wide.

> * This device (Lenovo Yoga 2 1051F) is a bytcr device. However bios
> status returned by iosf_mbi_read is
>     1000000001000000000000101000000 (bits 26:27 disabled).
>    Had to force  bytcr flag to be true  in order to apply correct MCLK
> frequency (25Mhz) and use SSP0
> 
> * Used commands from rt5640 UCM file, removing 5640 specifics and
> using Wolfson ones (thanks to Charles for point this out previously):
> cset name='HPOUT1L Input 1' AIF1RX1
> cset name='HPOUT1R Input 1' AIF1RX2
> cset name='HPOUT1 Digital Switch' on
> 
> 
> cset name='Headphone Switch'  on
> 
> * Used some patches to enable wm5102 ACPI detection (credits to
> Christian Hartmann)
> 
> * Added a voltage supplier needed to wm5102 (added to arizona-ldo
> directly - Lenovo and rpi register a platform with these)

Should probably look at splitting that out into its own regulator
and making it the supply for the LDO.

> * hardcoded ldoena, reset and irq_gpio on arizona-core (tried to get
> those from gpio, but they didn't give me the correct values. Lack of
> knowledge... )
> 

Not sure on this front I am afraid.

> * The codec chip uses SPI, not IC2 like 5640 (don't know if this is
> relevant for machine driver code)

This should not matter from the machine driver it should all be
hidden behing regmap at that level.

Thanks,
Charles

  reply	other threads:[~2017-05-15 12:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJcYhpZU-6_AO_Gye1VttuvOP0Z2=wLuWGCOP7tBWc6DsuLU1g@mail.gmail.com>
2016-05-05  3:15 ` WM5102 - Help to make baytrail machine driver work Pierre-Louis Bossart
2016-05-07  3:40   ` Paulo Sergio
2016-05-05  9:11 ` Charles Keepax
2016-05-07  3:19   ` Paulo Sergio
2016-05-08 11:44     ` Paulo Sergio
2016-05-09 14:22       ` Charles Keepax
2016-05-13  2:54         ` Paulo Sergio
2016-05-13 11:41           ` Charles Keepax
2016-05-14 23:14             ` Paulo Sergio
2016-05-15 10:13               ` Charles Keepax
     [not found]                 ` <CAJcYhpaFiDrMYmbS1cUWL=ix-L2crjnNekpCXjjdHVThwp2Xag@mail.gmail.com>
     [not found]                   ` <20170508082422.GJ1594@localhost.localdomain>
2017-05-09  0:57                     ` Paulo Sergio
2017-05-09  3:15                       ` Pierre-Louis Bossart
2017-05-09 14:45                         ` Paulo Sergio
2017-05-09 14:57                           ` Pierre-Louis Bossart
2017-05-10  8:21                             ` Charles Keepax
2017-05-13  5:11                             ` Paulo Sergio
2017-05-15 12:02                               ` Charles Keepax [this message]
2017-05-15 12:44                               ` Pierre-Louis Bossart
2017-05-15 13:10                                 ` Paulo Sergio
2017-05-18 12:49                                   ` Paulo Sergio
2017-05-18 14:58                                     ` Pierre-Louis Bossart

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=20170515120255.GL1594@localhost.localdomain \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=android-x86-devel@googlegroups.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cwhuang@android-x86.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=pstglia@gmail.com \
    --cc=vinod.koul@intel.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).