From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: alsa-devel <alsa-devel@alsa-project.org>,
Philipp Zabel <philipp.zabel@gmail.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH v3 2/2] ASoC: Add HP iPAQ RX1950 support
Date: Sat, 28 Aug 2010 10:06:17 +0100 [thread overview]
Message-ID: <20100828090604.GB9324@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1282985666-13973-1-git-send-email-anarsoul@gmail.com>
On Sat, Aug 28, 2010 at 11:54:26AM +0300, Vasily Khoruzhick wrote:
This is basically fine but needs to be redone against current ASoC due
to Liam's multi-component work - the way the machine driver is
registered with the system has changed. See either -next or
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git for-2.6.37
for the latest code.
> +static int rx1950_startup(struct snd_pcm_substream *substream)
> +{
> + struct snd_pcm_runtime *runtime = substream->runtime;
> +
> + runtime->hw.rate_min = hw_rates.list[0];
> + runtime->hw.rate_max = hw_rates.list[hw_rates.count - 1];
> + runtime->hw.rates = SNDRV_PCM_RATE_KNOT;
> +
> + return snd_pcm_hw_constraint_list(runtime, 0,
> + SNDRV_PCM_HW_PARAM_RATE,
> + &hw_rates);
> +}
Where does this constraint come from? It's the sort of thing that
sounds like it comes from one of the chips so I'd expect their drivers
to be figuring it out. Let's see below...
> +static int rx1950_spk_power(struct snd_soc_dapm_widget *w,
> + struct snd_kcontrol *kcontrol, int event)
> +{
> + if (SND_SOC_DAPM_EVENT_ON(event))
> + gpio_direction_output(S3C2410_GPA(1), 1);
> + else
> + gpio_direction_output(S3C2410_GPA(1), 0);
> +
> + return 0;
> +}
We should really make a standard GPIO DAPM thing. Not a problem for
this driver, though.
> + switch (rate) {
> + case 16000:
> + case 48000:
> + clk_source = S3C24XX_CLKSRC_PCLK;
> + fs_mode = S3C2410_IISMOD_384FS;
> + div = s3c24xx_i2s_get_clockrate() / (384 * rate);
> + if (s3c24xx_i2s_get_clockrate() % (384 * rate) > (182 * rate))
> + div++;
> + break;
> + case 44100:
> + case 88200:
> + clk_source = S3C24XX_CLKSRC_MPLL;
> + fs_mode = S3C2410_IISMOD_256FS;
> + div = clk_get_rate(xtal) / (256 * rate);
> + if (clk_get_rate(xtal) % (256 * rate) > (128 * rate))
> + div++;
> + break;
...right, it's the CPU driver which is a bit more manual than is ideal.
OK, again not a problem for this driver.
next prev parent reply other threads:[~2010-08-28 9:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-28 7:49 [PATCH 0/2] ASoC: Add iPAQ RX1950 sound support Vasily Khoruzhick
2010-08-28 7:49 ` [PATCH 1/2] ASoC: uda1380: make driver more powersave-friendly Vasily Khoruzhick
2010-08-28 8:56 ` Mark Brown
2010-08-28 9:07 ` Vasily Khoruzhick
2010-08-28 9:14 ` Mark Brown
2010-08-28 9:17 ` Vasily Khoruzhick
2010-08-28 11:34 ` [PATCH v2 " Vasily Khoruzhick
2010-08-28 7:49 ` [PATCH 2/2] ASoC: Add HP iPAQ RX1950 support Vasily Khoruzhick
2010-08-28 8:31 ` Vasily Khoruzhick
2010-08-28 8:37 ` [PATCH v2 " Vasily Khoruzhick
2010-08-28 8:46 ` Vasily Khoruzhick
2010-08-28 8:54 ` [PATCH v3 " Vasily Khoruzhick
2010-08-28 9:06 ` Mark Brown [this message]
2010-08-28 9:28 ` Vasily Khoruzhick
2010-08-31 10:45 ` Mark Brown
2010-08-28 11:37 ` Vasily Khoruzhick
2010-08-29 9:31 ` Vasily Khoruzhick
2010-08-29 13:54 ` Mark Brown
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=20100828090604.GB9324@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=anarsoul@gmail.com \
--cc=lrg@slimlogic.co.uk \
--cc=philipp.zabel@gmail.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).