lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180829145355.GD27808@sirena.org.uk>
Date:   Wed, 29 Aug 2018 15:53:55 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>
Cc:     alsa-devel@...a-project.org, devicetree@...r.kernel.org,
        robh+dt@...nel.org, alexandre.belloni@...tlin.com,
        nicolas.ferre@...rochip.com, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, florian.meier@...lo.de,
        cristian.birsan@...rochip.com
Subject: Re: [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a
 WM8731)

On Wed, Aug 29, 2018 at 05:47:26PM +0300, Codrin Ciubotariu wrote:

> +static const unsigned int wm8731_rates_12288000[] = {
> +	8000, 32000, 48000, 96000,
> +};
> +
> +static struct snd_pcm_hw_constraint_list wm8731_constraints_12288000 = {
> +	.list = wm8731_rates_12288000,
> +	.count = ARRAY_SIZE(wm8731_rates_12288000),
> +};
> +
> +static int snd_proto_startup(struct snd_pcm_substream *substream)
> +{
> +	/* Setup constraints, because there is a 12.288 MHz XTAL on the board */
> +	snd_pcm_hw_constraint_list(substream->runtime, 0,
> +				   SNDRV_PCM_HW_PARAM_RATE,
> +				   &wm8731_constraints_12288000);
> +	return 0;
> +}

This bit is better added to the CODEC driver since it'll apply to any
system where there's this clock rate (someone else could come in and add
other rates, no need to do that yourself though it'd be nice of course).

That also has the nice bonus that with that I think you'd be able to use
the graph card rather than a custom driver?

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ