diff options
| -rw-r--r-- | sound/soc/intel/boards/cht_bsw_rt5645.c | 6 | ||||
| -rw-r--r-- | sound/soc/intel/boards/mfld_machine.c | 16 | ||||
| -rw-r--r-- | sound/soc/intel/skylake/skl-topology.c | 2 |
3 files changed, 14 insertions, 10 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 2d3afddb0a2e..a7b96a9a4e0e 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c | |||
| @@ -367,8 +367,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev) | |||
| 367 | } | 367 | } |
| 368 | card->dev = &pdev->dev; | 368 | card->dev = &pdev->dev; |
| 369 | sprintf(codec_name, "i2c-%s:00", drv->acpi_card->codec_id); | 369 | sprintf(codec_name, "i2c-%s:00", drv->acpi_card->codec_id); |
| 370 | |||
| 370 | /* set correct codec name */ | 371 | /* set correct codec name */ |
| 371 | strcpy((char *)card->dai_link[2].codec_name, codec_name); | 372 | for (i = 0; i < ARRAY_SIZE(cht_dailink); i++) |
| 373 | if (!strcmp(card->dai_link[i].codec_name, "i2c-10EC5645:00")) | ||
| 374 | card->dai_link[i].codec_name = kstrdup(codec_name, GFP_KERNEL); | ||
| 375 | |||
| 372 | snd_soc_card_set_drvdata(card, drv); | 376 | snd_soc_card_set_drvdata(card, drv); |
| 373 | ret_val = devm_snd_soc_register_card(&pdev->dev, card); | 377 | ret_val = devm_snd_soc_register_card(&pdev->dev, card); |
| 374 | if (ret_val) { | 378 | if (ret_val) { |
diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c index 49c09a0add79..34f46c72a0e2 100644 --- a/sound/soc/intel/boards/mfld_machine.c +++ b/sound/soc/intel/boards/mfld_machine.c | |||
| @@ -94,7 +94,7 @@ static const struct soc_enum lo_enum = | |||
| 94 | static int headset_get_switch(struct snd_kcontrol *kcontrol, | 94 | static int headset_get_switch(struct snd_kcontrol *kcontrol, |
| 95 | struct snd_ctl_elem_value *ucontrol) | 95 | struct snd_ctl_elem_value *ucontrol) |
| 96 | { | 96 | { |
| 97 | ucontrol->value.integer.value[0] = hs_switch; | 97 | ucontrol->value.enumerated.item[0] = hs_switch; |
| 98 | return 0; | 98 | return 0; |
| 99 | } | 99 | } |
| 100 | 100 | ||
| @@ -104,12 +104,12 @@ static int headset_set_switch(struct snd_kcontrol *kcontrol, | |||
| 104 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); | 104 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
| 105 | struct snd_soc_dapm_context *dapm = &card->dapm; | 105 | struct snd_soc_dapm_context *dapm = &card->dapm; |
| 106 | 106 | ||
| 107 | if (ucontrol->value.integer.value[0] == hs_switch) | 107 | if (ucontrol->value.enumerated.item[0] == hs_switch) |
| 108 | return 0; | 108 | return 0; |
| 109 | 109 | ||
| 110 | snd_soc_dapm_mutex_lock(dapm); | 110 | snd_soc_dapm_mutex_lock(dapm); |
| 111 | 111 | ||
| 112 | if (ucontrol->value.integer.value[0]) { | 112 | if (ucontrol->value.enumerated.item[0]) { |
| 113 | pr_debug("hs_set HS path\n"); | 113 | pr_debug("hs_set HS path\n"); |
| 114 | snd_soc_dapm_enable_pin_unlocked(dapm, "Headphones"); | 114 | snd_soc_dapm_enable_pin_unlocked(dapm, "Headphones"); |
| 115 | snd_soc_dapm_disable_pin_unlocked(dapm, "EPOUT"); | 115 | snd_soc_dapm_disable_pin_unlocked(dapm, "EPOUT"); |
| @@ -123,7 +123,7 @@ static int headset_set_switch(struct snd_kcontrol *kcontrol, | |||
| 123 | 123 | ||
| 124 | snd_soc_dapm_mutex_unlock(dapm); | 124 | snd_soc_dapm_mutex_unlock(dapm); |
| 125 | 125 | ||
| 126 | hs_switch = ucontrol->value.integer.value[0]; | 126 | hs_switch = ucontrol->value.enumerated.item[0]; |
| 127 | 127 | ||
| 128 | return 0; | 128 | return 0; |
| 129 | } | 129 | } |
| @@ -148,7 +148,7 @@ static void lo_enable_out_pins(struct snd_soc_dapm_context *dapm) | |||
| 148 | static int lo_get_switch(struct snd_kcontrol *kcontrol, | 148 | static int lo_get_switch(struct snd_kcontrol *kcontrol, |
| 149 | struct snd_ctl_elem_value *ucontrol) | 149 | struct snd_ctl_elem_value *ucontrol) |
| 150 | { | 150 | { |
| 151 | ucontrol->value.integer.value[0] = lo_dac; | 151 | ucontrol->value.enumerated.item[0] = lo_dac; |
| 152 | return 0; | 152 | return 0; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| @@ -158,7 +158,7 @@ static int lo_set_switch(struct snd_kcontrol *kcontrol, | |||
| 158 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); | 158 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
| 159 | struct snd_soc_dapm_context *dapm = &card->dapm; | 159 | struct snd_soc_dapm_context *dapm = &card->dapm; |
| 160 | 160 | ||
| 161 | if (ucontrol->value.integer.value[0] == lo_dac) | 161 | if (ucontrol->value.enumerated.item[0] == lo_dac) |
| 162 | return 0; | 162 | return 0; |
| 163 | 163 | ||
| 164 | snd_soc_dapm_mutex_lock(dapm); | 164 | snd_soc_dapm_mutex_lock(dapm); |
| @@ -168,7 +168,7 @@ static int lo_set_switch(struct snd_kcontrol *kcontrol, | |||
| 168 | */ | 168 | */ |
| 169 | lo_enable_out_pins(dapm); | 169 | lo_enable_out_pins(dapm); |
| 170 | 170 | ||
| 171 | switch (ucontrol->value.integer.value[0]) { | 171 | switch (ucontrol->value.enumerated.item[0]) { |
| 172 | case 0: | 172 | case 0: |
| 173 | pr_debug("set vibra path\n"); | 173 | pr_debug("set vibra path\n"); |
| 174 | snd_soc_dapm_disable_pin_unlocked(dapm, "VIB1OUT"); | 174 | snd_soc_dapm_disable_pin_unlocked(dapm, "VIB1OUT"); |
| @@ -202,7 +202,7 @@ static int lo_set_switch(struct snd_kcontrol *kcontrol, | |||
| 202 | 202 | ||
| 203 | snd_soc_dapm_mutex_unlock(dapm); | 203 | snd_soc_dapm_mutex_unlock(dapm); |
| 204 | 204 | ||
| 205 | lo_dac = ucontrol->value.integer.value[0]; | 205 | lo_dac = ucontrol->value.enumerated.item[0]; |
| 206 | return 0; | 206 | return 0; |
| 207 | } | 207 | } |
| 208 | 208 | ||
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index a294fee431f0..5a4837dcfce3 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c | |||
| @@ -978,7 +978,7 @@ static int skl_tplg_tlv_control_set(struct snd_kcontrol *kcontrol, | |||
| 978 | return -EFAULT; | 978 | return -EFAULT; |
| 979 | } else { | 979 | } else { |
| 980 | if (copy_from_user(ac->params, | 980 | if (copy_from_user(ac->params, |
| 981 | data + 2 * sizeof(u32), size)) | 981 | data + 2, size)) |
| 982 | return -EFAULT; | 982 | return -EFAULT; |
| 983 | } | 983 | } |
| 984 | 984 | ||
