lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 01/16] ASoC: tegra: Fix wrong value type in ADMAIF
    Date
    The enum controls are expected to use enumerated value type.
    Update relevant references in control get/put callbacks.

    Fixes: f74028e159bb ("ASoC: tegra: Add Tegra210 based ADMAIF driver")
    Suggested-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sameer Pujar <spujar@nvidia.com>
    ---
    sound/soc/tegra/tegra210_admaif.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/sound/soc/tegra/tegra210_admaif.c b/sound/soc/tegra/tegra210_admaif.c
    index bcccdf3..6febe80 100644
    --- a/sound/soc/tegra/tegra210_admaif.c
    +++ b/sound/soc/tegra/tegra210_admaif.c
    @@ -430,7 +430,7 @@ static int tegra_admaif_get_control(struct snd_kcontrol *kcontrol,
    struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
    struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value;
    struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt);
    - long *uctl_val = &ucontrol->value.integer.value[0];
    + unsigned int *uctl_val = &ucontrol->value.enumerated.item[0];

    if (strstr(kcontrol->id.name, "Playback Mono To Stereo"))
    *uctl_val = admaif->mono_to_stereo[ADMAIF_TX_PATH][ec->reg];
    @@ -450,7 +450,7 @@ static int tegra_admaif_put_control(struct snd_kcontrol *kcontrol,
    struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
    struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value;
    struct tegra_admaif *admaif = snd_soc_component_get_drvdata(cmpnt);
    - int value = ucontrol->value.integer.value[0];
    + unsigned int value = ucontrol->value.enumerated.item[0];

    if (strstr(kcontrol->id.name, "Playback Mono To Stereo"))
    admaif->mono_to_stereo[ADMAIF_TX_PATH][ec->reg] = value;
    --
    2.7.4
    \
     
     \ /
      Last update: 2021-11-18 08:08    [W:2.397 / U:0.456 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site