[alsa-devel] [PATCH v2] firmware: vpd: Add an interface to read VPD value

Greg Kroah-Hartman gregkh at linuxfoundation.org
Tue Oct 8 14:06:49 CEST 2019


On Tue, Oct 08, 2019 at 06:11:44PM +0800, Cheng-Yi Chiang wrote:
> Add an interface for other driver to query VPD value.
> This will be used for ASoC machine driver to query calibration
> data stored in VPD for smart amplifier speaker resistor
> calibration.
> 
> The example usage in ASoC machine driver is like:
> 
> #define DSM_CALIB_KEY "dsm_calib"
> static int load_calibration_data(struct cml_card_private *ctx) {
>     char *data = NULL;
>     int ret;
>     u32 value_len;
> 
>     /* Read calibration data from VPD. */
>     ret = vpd_attribute_read(1, DSM_CALIB_KEY,
>                             (u8 **)&data, &value_len);
> 
>     /* Parsing of this string...*/
> }
> 
> 
> Signed-off-by: Cheng-Yi Chiang <cychiang at chromium.org>
> ---

I can't take this patch without a real user of this function in the
kernel tree at the same time.  Please submit it as part of a patch
series with that change as well.

thanks,

greg k-h


More information about the Alsa-devel mailing list