ALSA: ASoC: Don't suggest compile time selection of codec access
Currently the boiler plate code used by most ASoC codecs to provide a placeholder for SPI access suggests making the selection of SPI a compile time option which is suboptimal when trying to build kernels supporting multiple systems. Change this template to suggest allowing runtime selection instead. Leave the drivers not yet converted to new style I2C access for now to avoid collisions. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
d2a403553b
commit
b7c9d85205
|
@ -622,7 +622,7 @@ static int ak4535_probe(struct platform_device *pdev)
|
||||||
struct ak4535_setup_data *setup;
|
struct ak4535_setup_data *setup;
|
||||||
struct snd_soc_codec *codec;
|
struct snd_soc_codec *codec;
|
||||||
struct ak4535_priv *ak4535;
|
struct ak4535_priv *ak4535;
|
||||||
int ret = 0;
|
int ret;
|
||||||
|
|
||||||
printk(KERN_INFO "AK4535 Audio Codec %s", AK4535_VERSION);
|
printk(KERN_INFO "AK4535 Audio Codec %s", AK4535_VERSION);
|
||||||
|
|
||||||
|
@ -644,14 +644,14 @@ static int ak4535_probe(struct platform_device *pdev)
|
||||||
INIT_LIST_HEAD(&codec->dapm_paths);
|
INIT_LIST_HEAD(&codec->dapm_paths);
|
||||||
|
|
||||||
ak4535_socdev = socdev;
|
ak4535_socdev = socdev;
|
||||||
|
ret = -ENODEV;
|
||||||
|
|
||||||
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||||
if (setup->i2c_address) {
|
if (setup->i2c_address) {
|
||||||
codec->hw_write = (hw_write_t)i2c_master_send;
|
codec->hw_write = (hw_write_t)i2c_master_send;
|
||||||
codec->hw_read = (hw_read_t)i2c_master_recv;
|
codec->hw_read = (hw_read_t)i2c_master_recv;
|
||||||
ret = ak4535_add_i2c_device(pdev, setup);
|
ret = ak4535_add_i2c_device(pdev, setup);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
/* Add other interfaces here */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
|
|
@ -788,7 +788,7 @@ static int uda1380_probe(struct platform_device *pdev)
|
||||||
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
|
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
|
||||||
struct uda1380_setup_data *setup;
|
struct uda1380_setup_data *setup;
|
||||||
struct snd_soc_codec *codec;
|
struct snd_soc_codec *codec;
|
||||||
int ret = 0;
|
int ret;
|
||||||
|
|
||||||
pr_info("UDA1380 Audio Codec %s", UDA1380_VERSION);
|
pr_info("UDA1380 Audio Codec %s", UDA1380_VERSION);
|
||||||
|
|
||||||
|
@ -803,13 +803,13 @@ static int uda1380_probe(struct platform_device *pdev)
|
||||||
INIT_LIST_HEAD(&codec->dapm_paths);
|
INIT_LIST_HEAD(&codec->dapm_paths);
|
||||||
|
|
||||||
uda1380_socdev = socdev;
|
uda1380_socdev = socdev;
|
||||||
|
ret = -ENODEV;
|
||||||
|
|
||||||
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||||
if (setup->i2c_address) {
|
if (setup->i2c_address) {
|
||||||
codec->hw_write = (hw_write_t)i2c_master_send;
|
codec->hw_write = (hw_write_t)i2c_master_send;
|
||||||
ret = uda1380_add_i2c_device(pdev, setup);
|
ret = uda1380_add_i2c_device(pdev, setup);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
/* Add other interfaces here */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
|
|
|
@ -934,7 +934,7 @@ static int wm8750_probe(struct platform_device *pdev)
|
||||||
struct wm8750_setup_data *setup = socdev->codec_data;
|
struct wm8750_setup_data *setup = socdev->codec_data;
|
||||||
struct snd_soc_codec *codec;
|
struct snd_soc_codec *codec;
|
||||||
struct wm8750_priv *wm8750;
|
struct wm8750_priv *wm8750;
|
||||||
int ret = 0;
|
int ret;
|
||||||
|
|
||||||
pr_info("WM8750 Audio Codec %s", WM8750_VERSION);
|
pr_info("WM8750 Audio Codec %s", WM8750_VERSION);
|
||||||
codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
|
codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
|
||||||
|
@ -955,13 +955,13 @@ static int wm8750_probe(struct platform_device *pdev)
|
||||||
wm8750_socdev = socdev;
|
wm8750_socdev = socdev;
|
||||||
INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work);
|
INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work);
|
||||||
|
|
||||||
|
ret = -ENODEV;
|
||||||
|
|
||||||
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||||
if (setup->i2c_address) {
|
if (setup->i2c_address) {
|
||||||
codec->hw_write = (hw_write_t)i2c_master_send;
|
codec->hw_write = (hw_write_t)i2c_master_send;
|
||||||
ret = wm8750_add_i2c_device(pdev, setup);
|
ret = wm8750_add_i2c_device(pdev, setup);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
/* Add other interfaces here */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
|
|
@ -1565,7 +1565,7 @@ static int wm8990_probe(struct platform_device *pdev)
|
||||||
struct wm8990_setup_data *setup;
|
struct wm8990_setup_data *setup;
|
||||||
struct snd_soc_codec *codec;
|
struct snd_soc_codec *codec;
|
||||||
struct wm8990_priv *wm8990;
|
struct wm8990_priv *wm8990;
|
||||||
int ret = 0;
|
int ret;
|
||||||
|
|
||||||
pr_info("WM8990 Audio Codec %s\n", WM8990_VERSION);
|
pr_info("WM8990 Audio Codec %s\n", WM8990_VERSION);
|
||||||
|
|
||||||
|
@ -1587,13 +1587,13 @@ static int wm8990_probe(struct platform_device *pdev)
|
||||||
INIT_LIST_HEAD(&codec->dapm_paths);
|
INIT_LIST_HEAD(&codec->dapm_paths);
|
||||||
wm8990_socdev = socdev;
|
wm8990_socdev = socdev;
|
||||||
|
|
||||||
|
ret = -ENODEV;
|
||||||
|
|
||||||
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
|
||||||
if (setup->i2c_address) {
|
if (setup->i2c_address) {
|
||||||
codec->hw_write = (hw_write_t)i2c_master_send;
|
codec->hw_write = (hw_write_t)i2c_master_send;
|
||||||
ret = wm8990_add_i2c_device(pdev, setup);
|
ret = wm8990_add_i2c_device(pdev, setup);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
/* Add other interfaces here */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
|
Loading…
Reference in New Issue