From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Chaithrika U S <chaithrika@ti.com>
Cc: khilman@deeprootsystems.com, alsa-devel@alsa-project.org,
davinci-linux-open-source@linux.davincidsp.com
Subject: Re: [PATCH] ASoC: DaVinci: Updates to EVM hardware params callback
Date: Tue, 26 Jan 2010 11:14:15 +0000 [thread overview]
Message-ID: <20100126111415.GK15759@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1263987161-29657-1-git-send-email-chaithrika@ti.com>
On Wed, Jan 20, 2010 at 05:02:41PM +0530, Chaithrika U S wrote:
> @@ -64,9 +64,11 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
> return -EINVAL;
>
> /* set codec DAI configuration */
> - ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
> - if (ret < 0)
> - return ret;
> + if (codec_dai->ops->set_fmt) {
> + ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
> + if (ret < 0)
> + return ret;
> + }
It would be better to have separate hw_params() functions for separate
links rather than do things like this. There's a strong expectation
that the board driver knows exactly what CODEC it's talking to and how
to configure it so code like this looks odd.
prev parent reply other threads:[~2010-01-26 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 11:32 [PATCH] ASoC: DaVinci: Updates to EVM hardware params callback Chaithrika U S
2010-01-26 11:14 ` Mark Brown [this message]
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=20100126111415.GK15759@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=chaithrika@ti.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=khilman@deeprootsystems.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