From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: apatard@mandriva.com
Cc: alsa-devel@alsa-project.org, nico@fluxnic.net, saeed@marvell.com,
tbm@cyrius.com, linux-arm-kernel@lists.infradead.org,
lrg@slimlogic.co.uk
Subject: Re: [patch 3/5] cs42l51: add asoc driver
Date: Tue, 25 May 2010 15:51:52 -0700 [thread overview]
Message-ID: <20100525225151.GA13890@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20100525122341.121399024@mandriva.com>
On Tue, May 25, 2010 at 02:22:39PM +0200, apatard@mandriva.com wrote:
> + /* route microphone */
> + ret = snd_soc_write(codec, CS42L51_ADC_INPUT, 0xF0);
> + if (ret < 0)
> + goto error_alloc;
As I said last time this really should be visible to userspace rather
than fixed function in the driver.
> +#define DAPM_EVENT_PRE_POST_PMD (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD)
As I said last time this should be in soc-dapm.h rather than in the
driver.
> + SND_SOC_DAPM_DAC_E("Left DAC", "Left HiFi Playback",
> + CS42L51_POWER_CTL1, 5, 1,
> + cs42l51_pdn_event, DAPM_EVENT_PRE_POST_PMD),
> + SND_SOC_DAPM_DAC_E("Right DAC", "Right HiFi Playback",
> + CS42L51_POWER_CTL1, 6, 1,
> + cs42l51_pdn_event, DAPM_EVENT_PRE_POST_PMD),
Your event here uses snd_soc_write() so for a stereo enable/disable
you'll do extra writes. If you changed it to use snd_soc_update_bits()
then these would be suppressed.
> + switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
> + case SND_SOC_DAIFMT_CBM_CFM:
> + cs42l51->func = MODE_MASTER;
> + break;
> + default:
> + case SND_SOC_DAIFMT_CBS_CFS:
> + cs42l51->func = MODE_SLAVE_AUTO;
> + break;
Is the device really capable of automatically coping with mixed master
buses automatically, or should the default be to return an error?
> + dev_info(&pdev->dev, "CS42L51 ALSA SoC Codec\n");
I really would prefer to remove this.
> +struct cs42l51_setup_data {
> + int i2c_bus;
> + unsigned short i2c_address;
> +};
This is unused and could be removed.
next prev parent reply other threads:[~2010-05-25 22:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 12:22 [patch 0/5] kirkwood openrd client audio support - v3 apatard
2010-05-25 12:22 ` [patch 1/5] orion/kirkwood: add audio functions apatard
2010-05-25 12:22 ` [patch 2/5] openrd-client: initialise audio apatard
2010-05-25 12:22 ` [patch 3/5] cs42l51: add asoc driver apatard
2010-05-25 22:51 ` Mark Brown [this message]
2010-05-26 8:20 ` Arnaud Patard
2010-05-27 0:52 ` Mark Brown
2010-05-25 12:22 ` [patch 4/5] orion/kirkwood: Add i2s support apatard
2010-05-26 0:31 ` Nicolas Pitre
2010-05-26 5:15 ` saeed bishara
2010-05-26 16:55 ` Nicolas Pitre
2010-05-26 8:25 ` Arnaud Patard
2010-05-26 17:02 ` Nicolas Pitre
2010-05-25 12:22 ` [patch 5/5] kirkwood: Add audio support to openrd client platforms apatard
2010-05-25 23:18 ` [patch 0/5] kirkwood openrd client audio support - v3 Mark Brown
2010-05-26 1:10 ` Nicolas Pitre
2010-05-26 2:31 ` Mark Brown
2010-05-26 2:49 ` Nicolas Pitre
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=20100525225151.GA13890@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=apatard@mandriva.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lrg@slimlogic.co.uk \
--cc=nico@fluxnic.net \
--cc=saeed@marvell.com \
--cc=tbm@cyrius.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).