1
0
Fork 0
Commit Graph

10 Commits (redonkable)

Author SHA1 Message Date
Shengjiu Wang 78b719abec ASoC: imx-wm8958: Fix compile error
API change due to:
adb76b5b9c ("ASoC: soc-core: remove legacy style dai_link")

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2019-11-25 15:50:53 +08:00
Dong Aisheng 69bef11189 ASoC: fsl: imx-wm8958: fix build for 5.1 RC kernel
../sound/soc/fsl/imx-wm8958.c: In function 'hpjack_status_check':
../sound/soc/fsl/imx-wm8958.c:88:3: error: implicit declaration of function 'snd_soc_codec_get_dapm' [-Werror=implicit-function-declaration]
   snd_soc_dapm_disable_pin(snd_soc_codec_get_dapm(priv->codec), "Ext Spk");
   ^
../sound/soc/fsl/imx-wm8958.c:88:3: warning: passing argument 1 of 'snd_soc_dapm_disable_pin' makes pointer from integer without a cast
In file included from ../include/sound/soc.h:413:0,
                 from ../sound/soc/fsl/imx-wm8958.c:19:
../include/sound/soc-dapm.h:449:5: note: expected 'struct snd_soc_dapm_context *' but argument is of type 'int'
 int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
     ^
../sound/soc/fsl/imx-wm8958.c:92:3: warning: passing argument 1 of 'snd_soc_dapm_enable_pin' makes pointer from integer without a cast
   snd_soc_dapm_enable_pin(snd_soc_codec_get_dapm(priv->codec), "Ext Spk");
   ^
In file included from ../include/sound/soc.h:413:0,
                 from ../sound/soc/fsl/imx-wm8958.c:19:
../include/sound/soc-dapm.h:445:5: note: expected 'struct snd_soc_dapm_context *' but argument is of type 'int'
 int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm,
     ^
../sound/soc/fsl/imx-wm8958.c: In function 'imx_hifi_hw_params':
../sound/soc/fsl/imx-wm8958.c:126:41: error: 'struct snd_soc_dai' has no member named 'codec'
  struct snd_soc_codec *codec = codec_dai->codec;
                                         ^
../sound/soc/fsl/imx-wm8958.c:210:2: error: implicit declaration of function 'snd_soc_update_bits' [-Werror=implicit-function-declaration]
  snd_soc_update_bits(codec, WM8994_GPIO_1, 0x1f, 0x2);
  ^
../sound/soc/fsl/imx-wm8958.c: In function 'imx_wm8958_gpio_init':
../sound/soc/fsl/imx-wm8958.c:292:41: error: 'struct snd_soc_dai' has no member named 'codec'
  struct snd_soc_codec *codec = codec_dai->codec;

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2019-11-25 15:50:47 +08:00
Shengjiu Wang b554454f67 MLK-19733-3: ASoC: imx-wm8958: Remove duplicate jack kcontrol
We first add the jack kcontrol in commit c2c7959e3af3 ("MLK-11479-09
pulseaudio5.0 mute Headphone volume when Headphone plugged")

After that there is change in kernel by commit f63e8581e2 ("ASoC: jack:
create kctls according to jack pins info"), the jack kcontrol will be
created with snd_soc_jack_add_pins.

So our change for jack kcontrol in machine driver is not need now, for
driver already call imx_wm8958_gpio_init -> snd_soc_card_jack_new ->
snd_soc_jack_add_pins. otherwise the jack kcontrol will be created twice.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2019-11-25 15:50:43 +08:00
Daniel Baluta 06532305e2 MLK-15067: ASoC: fsl: imx-wm8958: Kill warning for non-gpr boards
Similar with 7c280619ed45b (" MLK-14663-2: ASoC: fsl: imx-wm8960: Kill
warning for non-gpr boards")

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-25 15:50:13 +08:00
Daniel Baluta 6e74493303 MLK-15067: ASoC: fsl: imx-wm8958: Refactor GPR parsing
This is similar with commit c79a82aec8ccf ("ASoC: fsl: imx-wm8960: Refactor
GPR parsing") and it is needed for easier adding support for non-gpr boards.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-25 15:50:13 +08:00
Daniel Baluta 1c3a98e0fc MLK-15067: ASoC: fsl: imx-wm8958: Don't fail if gpr is missing
There are boards without gpr setting, so it's better not to fail
in such cases and only print a warning.

This is related to commit ce72b6d2668049 ("MLK-13574-1: ASoC: imx-wm8960:
remove the gpr dependency").

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-25 15:50:09 +08:00
Shengjiu Wang d1ab1dbc59 MLK-13369-1: ASoC: fsl: fix the hard code gpr address in machine driver
There is hard code for gpr address in machine driver, imx-wm8960
and imx-wm8958, when the sai interface changed to sai1 or sai3,
there will be issue, so remove the hard code, use the property
from the device tree.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2019-11-25 15:50:06 +08:00
Zidan Wang 5bc6557674 MLK-12244 ASoC: fsl: Set the sound card owner field
When load sound card, the pulseaudio will using the sound card to
playback and record. It may be cause a kernel crash when the sound
card is unloaded while the playback/record is active

After setting the sound card owner field, when pulseaudio is running,
the sound card module ref-count will not be 0 and the sound card will
not be unloaded. So you should stop the pulseaudio when you want to
unload the sound card.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
[ Aisheng: hdmi change merged into hdmi branch ]
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2019-11-25 15:50:04 +08:00
Zidan Wang 61d25ac27e MLK-11915-05 ASoC: imx-wm8958: init codec_np to avoid wild pointer
init codec_np to avoid wild pointer. Reported by Coverity.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit 76665930654867cf38a86ba747a9f8a5bf2665e2)
2019-11-25 15:50:01 +08:00
Zidan Wang cc3d498408 MLK-11369-4 ASoC: imx-wm8958: port wm8958 machine driver from imx_3.14.y
port wm8958 machine driver from imx_3.14.y.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>

Fix build for DRIVER_ATTR removal during 4.14 rebase

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2019-11-25 15:49:50 +08:00