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  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]
Date:   Mon, 18 Feb 2019 18:18:07 +0000
From:   Mark Brown <>
To:     "Agrawal, Akshu" <>
Cc:     "" <>,
        "Deucher, Alexander" <>,
        Liam Girdwood <>,
        Jaroslav Kysela <>,
        Takashi Iwai <>,
        "Mukunda, Vijendar" <>,
        Wei Yongjun <>,
        Kuninori Morimoto <>,
        "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." 
        open list <>
Subject: Re: [PATCH] ASoC: AMD: Configure master codec on all
 playback/capture cases

On Fri, Feb 15, 2019 at 07:06:15AM +0000, Agrawal, Akshu wrote:

> +static static int cz_da7219_hw_params(struct snd_pcm_substream *substream,
> +				    struct snd_pcm_hw_params *params)
> +{
> +	/* da7219 Codec is clock master so setup as per the needs */
> +	if (codec_dai->driver->ops->hw_params)
> +		return codec_dai->driver->ops->hw_params(substream, params,
> +							 codec_dai);
> +	return 0;
> +}

No, this is a bad idea - you shouldn't be callings ops in drivers
outside of the framework, something is going to break on you there.
Either the drivers or the frameworks are going to get surprised by
things getting called out of sequence, for example I'd not rely on the
fact that the CODEC would be outputing a clock without active audio.
This probably means that you're going to have to extend the framework in
some way, or refactor things so that the BCLK is exported as a clock by
the CODEC and reflect the relationships via the clock API.  I need to
think a bit more but I think the clock API is going to be the the best

I also suspect that some work is needed to propagate constraints between
the various DAIs in the system.

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

Powered by blists - more mailing lists