All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Cross <xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 2/3] sound: soc: fsl: Add support for Novena onboard audio
Date: Sat, 08 Feb 2014 16:27:19 +0800	[thread overview]
Message-ID: <52F5EA67.1080008@kosagi.com> (raw)
In-Reply-To: <20140207181433.GM1757-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

On 8/2/14 2:14 AM, Mark Brown wrote:
> On Fri, Feb 07, 2014 at 01:05:16PM +0800, Sean Cross wrote:
>> Novena uses an ES8328 audio codec connected via I2S.
> 
> The CODEC looked pretty simple, can this use simple-card?

I had never heard of simple-card.  It doesn't look like it supports
device tree.  Novena doesn't have a platform definition, and we run
entirely using DT.  If simple-card can work without a platform
definition, then we can use it.  Otherwise, it's nearly identical to
imx-sgtl5000.c, with the exception of the code you called out.

>> +	/* Headphone jack detection */ +	if
>> (gpio_is_valid(data->jack_gpio)) { +		ret =
>> snd_soc_jack_new(rtd->codec, "Headset", +
>> SND_JACK_HEADSET | SND_JACK_BTN_0, +				       &headset_jack); +
>> if (ret) +			return ret; + +		headset_jack_gpios[0].gpio =
>> data->jack_gpio; +		ret = snd_soc_jack_add_gpios(&headset_jack, +
>> ARRAY_SIZE(headset_jack_gpios), +					     headset_jack_gpios); +
>> }
> 
> We'd need to add support for this but that shouldn't be too hard.

It does seem simple.  I could imagine specifying the jack in a device
tree file, and mapping it to a GPIO.

Can you think of why this would oops on removal?  If I disable
headphone jack detection (by simply making data->jack_gpio an invalid
gpio), the module removes cleanly.

>> +static int imx_set_frequency(struct imx_novena_data *data, int
>> freq) { +	int ret; + +	ret = clk_set_parent(data->system_cko,
>> data->codec_clk); +	if (ret) { +		dev_err(data->dev, "unable to
>> set clk output"); +		return ret; +	} + +	ret =
>> clk_set_parent(data->codec_clk_sel, data->codec_clk_post_div); +
>> if (ret) { +		dev_err(data->dev, "unable to set clk parent"); +
>> return ret; +	}
> 
> There's supposed to be support for this sort of thing going into
> the clock API with some sort of generic binding.

Can you direct me to this patch?  Is it supposed to be defined in the
device tree file?  As of right now, the clock is hardcoded to 24 MHz
in clk-imx6q.c, which is why we need to change it here.

--
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

  parent reply	other threads:[~2014-02-08  8:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07  5:05 [PATCH 0/3] Add i.MX6q Kosagi Novena support Sean Cross
     [not found] ` <1391749517-11787-1-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-02-07  5:05   ` [PATCH 1/3] sound: soc: codecs: Add es8328 codec Sean Cross
2014-02-07 18:12     ` Mark Brown
2014-02-08  8:10       ` Sean Cross
     [not found]         ` <52F5E661.5010807-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-02-10 14:23           ` Mark Brown
     [not found]       ` <20140207181238.GL1757-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-08  8:17         ` Sean Cross
2014-02-10  9:24         ` Sean Cross
     [not found]           ` <52F89ADF.8020305-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-02-10 14:27             ` Mark Brown
     [not found]     ` <1391749517-11787-2-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-02-08 16:06       ` [alsa-devel] " Lars-Peter Clausen
2014-02-07  5:05   ` [PATCH 2/3] sound: soc: fsl: Add support for Novena onboard audio Sean Cross
     [not found]     ` <1391749517-11787-3-git-send-email-xobs-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-02-07 18:14       ` Mark Brown
     [not found]         ` <20140207181433.GM1757-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-02-08  8:27           ` Sean Cross [this message]
     [not found]             ` <52F5EA67.1080008-nXMMniAx+RbQT0dZR+AlfA@public.gmane.org>
2014-02-10 14:45               ` Mark Brown
2014-02-07  5:05   ` [PATCH 3/3] dts: imx: add kosagi novena imx6q dts file Sean Cross

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=52F5EA67.1080008@kosagi.com \
    --to=xobs-nxmmniax+rbqt0dzr+alfa@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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.