Re: [PATCH v2 4/9] ASoC: codecs: Add uda1342 codec driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Sep 24, 2024 at 03:00:31PM +0800, Binbin Zhou wrote:

> @@ -0,0 +1,355 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * uda1342.c  --  UDA1342 ALSA SoC Codec driver
> + *
> + * Modifications by Christian Pellegrin <chripell@xxxxxxxxxxxx>

Please make the entire comment a C++ comment so things look more
intentional.

> +static int uda1342_hw_params(struct snd_pcm_substream *substream,
> +			     struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
> +{
> +	struct snd_soc_component *component = dai->component;
> +	struct uda1342_priv *uda1342 = snd_soc_component_get_drvdata(component);
> +	struct device *dev = &uda1342->i2c->dev;
> +	unsigned int hw_params = 0;
> +
> +	if (substream == uda1342->consumer_substream) {
> +		dev_info(dev, "ignoring hw_params for consumer substream\n");
> +		return 0;
> +	}

This is going to spam the logs loudly, dev_dbg() at most.  For modern
ALSA it's probably good to check that the configuration is the same,
indeed it'd be good to set constraints for the configuration of the
parent stream.  We used to have to care about OSS which would
transiently write invalid configurations but that was well over 10 years
ago so probably isn't relevant here.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux