Commit 2e8239e7 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus

parents 69973b83 2fc995a8
...@@ -771,6 +771,9 @@ static int sst_soc_prepare(struct device *dev) ...@@ -771,6 +771,9 @@ static int sst_soc_prepare(struct device *dev)
struct sst_data *drv = dev_get_drvdata(dev); struct sst_data *drv = dev_get_drvdata(dev);
struct snd_soc_pcm_runtime *rtd; struct snd_soc_pcm_runtime *rtd;
if (!drv->soc_card)
return 0;
/* suspend all pcms first */ /* suspend all pcms first */
snd_soc_suspend(drv->soc_card->dev); snd_soc_suspend(drv->soc_card->dev);
snd_soc_poweroff(drv->soc_card->dev); snd_soc_poweroff(drv->soc_card->dev);
...@@ -793,6 +796,9 @@ static void sst_soc_complete(struct device *dev) ...@@ -793,6 +796,9 @@ static void sst_soc_complete(struct device *dev)
struct sst_data *drv = dev_get_drvdata(dev); struct sst_data *drv = dev_get_drvdata(dev);
struct snd_soc_pcm_runtime *rtd; struct snd_soc_pcm_runtime *rtd;
if (!drv->soc_card)
return;
/* restart SSPs */ /* restart SSPs */
list_for_each_entry(rtd, &drv->soc_card->rtd_list, list) { list_for_each_entry(rtd, &drv->soc_card->rtd_list, list) {
struct snd_soc_dai *dai = rtd->cpu_dai; struct snd_soc_dai *dai = rtd->cpu_dai;
......
...@@ -452,6 +452,8 @@ static struct sst_acpi_mach sst_acpi_bytcr[] = { ...@@ -452,6 +452,8 @@ static struct sst_acpi_mach sst_acpi_bytcr[] = {
static struct sst_acpi_mach sst_acpi_chv[] = { static struct sst_acpi_mach sst_acpi_chv[] = {
{"10EC5670", "cht-bsw-rt5672", "intel/fw_sst_22a8.bin", "cht-bsw", NULL, {"10EC5670", "cht-bsw-rt5672", "intel/fw_sst_22a8.bin", "cht-bsw", NULL,
&chv_platform_data }, &chv_platform_data },
{"10EC5672", "cht-bsw-rt5672", "intel/fw_sst_22a8.bin", "cht-bsw", NULL,
&chv_platform_data },
{"10EC5645", "cht-bsw-rt5645", "intel/fw_sst_22a8.bin", "cht-bsw", NULL, {"10EC5645", "cht-bsw-rt5645", "intel/fw_sst_22a8.bin", "cht-bsw", NULL,
&chv_platform_data }, &chv_platform_data },
{"10EC5650", "cht-bsw-rt5645", "intel/fw_sst_22a8.bin", "cht-bsw", NULL, {"10EC5650", "cht-bsw-rt5645", "intel/fw_sst_22a8.bin", "cht-bsw", NULL,
......
...@@ -44,6 +44,7 @@ struct cht_acpi_card { ...@@ -44,6 +44,7 @@ struct cht_acpi_card {
struct cht_mc_private { struct cht_mc_private {
struct snd_soc_jack jack; struct snd_soc_jack jack;
struct cht_acpi_card *acpi_card; struct cht_acpi_card *acpi_card;
char codec_name[16];
}; };
static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card) static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
...@@ -354,7 +355,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev) ...@@ -354,7 +355,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
int i; int i;
struct cht_mc_private *drv; struct cht_mc_private *drv;
struct snd_soc_card *card = snd_soc_cards[0].soc_card; struct snd_soc_card *card = snd_soc_cards[0].soc_card;
char codec_name[16];
struct sst_acpi_mach *mach; struct sst_acpi_mach *mach;
const char *i2c_name = NULL; const char *i2c_name = NULL;
int dai_index = 0; int dai_index = 0;
...@@ -374,12 +374,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev) ...@@ -374,12 +374,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
} }
card->dev = &pdev->dev; card->dev = &pdev->dev;
mach = card->dev->platform_data; mach = card->dev->platform_data;
sprintf(codec_name, "i2c-%s:00", drv->acpi_card->codec_id); sprintf(drv->codec_name, "i2c-%s:00", drv->acpi_card->codec_id);
/* set correct codec name */ /* set correct codec name */
for (i = 0; i < ARRAY_SIZE(cht_dailink); i++) for (i = 0; i < ARRAY_SIZE(cht_dailink); i++)
if (!strcmp(card->dai_link[i].codec_name, "i2c-10EC5645:00")) { if (!strcmp(card->dai_link[i].codec_name, "i2c-10EC5645:00")) {
card->dai_link[i].codec_name = kstrdup(codec_name, GFP_KERNEL); card->dai_link[i].codec_name = drv->codec_name;
dai_index = i; dai_index = i;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment