Re: [PATCH 2/2] ASoC: rt298: Add DMI match for Broxton-P reference platform

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

 



> -----Original Message-----
> From: Vinod Koul [mailto:vinod.koul@xxxxxxxxx]
> Sent: Thursday, May 12, 2016 12:09 PM
> To: alsa-devel@xxxxxxxxxxxxxxxx
> Cc: broonie@xxxxxxxxxx; liam.r.girdwood@xxxxxxxxxxxxxxx;
> patches.audio@xxxxxxxxx; Bard Liao; Vinod Koul; Ramesh Babu;
> Senthilnathan Veppur
> Subject: [PATCH 2/2] ASoC: rt298: Add DMI match for Broxton-P
> reference platform
> 
> Broxton-P reference platform also uses combo jack for audio connector
> so we need to set codec pdata to use this based on DMI match for this
> board.
> 
> Signed-off-by: Ramesh Babu <ramesh.babu@xxxxxxxxx>
> Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@xxxxxxxxx>
> Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>

Acked-by: Bard Liao <bardliao@xxxxxxxxxxx>

> ---
>  sound/soc/codecs/rt298.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c index
> 45dc5fa24961..f80cfe4d2ef2 100644
> --- a/sound/soc/codecs/rt298.c
> +++ b/sound/soc/codecs/rt298.c
> @@ -17,6 +17,7 @@
>  #include <linux/i2c.h>
>  #include <linux/platform_device.h>
>  #include <linux/spi/spi.h>
> +#include <linux/dmi.h>
>  #include <linux/acpi.h>
>  #include <sound/core.h>
>  #include <sound/pcm.h>
> @@ -1127,6 +1128,17 @@ static const struct acpi_device_id
> rt298_acpi_match[] = {  };  MODULE_DEVICE_TABLE(acpi,
> rt298_acpi_match);
> 
> +static const struct dmi_system_id force_combo_jack_table[] = {
> +	{
> +		.ident = "Intel Broxton P",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "Broxton P")
> +		}
> +	},
> +	{ }
> +};
> +
>  static int rt298_i2c_probe(struct i2c_client *i2c,
>  			   const struct i2c_device_id *id)
>  {
> @@ -1184,6 +1196,11 @@ static int rt298_i2c_probe(struct i2c_client
> *i2c,
>  				acpiid->driver_data;
>  	}
> 
> +	if (dmi_check_system(force_combo_jack_table)) {
> +		rt298->pdata.cbj_en = true;
> +		rt298->pdata.gpio2_en = false;
> +	}
> +
>  	/* VREF Charging */
>  	regmap_update_bits(rt298->regmap, 0x04, 0x80, 0x80);
>  	regmap_update_bits(rt298->regmap, 0x1b, 0x860, 0x860);
> --
> 1.9.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux