Commit b28528a1 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Mark Brown

ASoC: UDA134X: Add UDA1345 CODEC support

This patch adds support for Philips UDA1345 CODEC. The CODEC has only
volume control, de-emphasis, mute, DC filtering and power control features.
Signed-off-by: default avatarVladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5e5e2bef
...@@ -21,6 +21,7 @@ struct uda134x_platform_data { ...@@ -21,6 +21,7 @@ struct uda134x_platform_data {
#define UDA134X_UDA1340 1 #define UDA134X_UDA1340 1
#define UDA134X_UDA1341 2 #define UDA134X_UDA1341 2
#define UDA134X_UDA1344 3 #define UDA134X_UDA1344 3
#define UDA134X_UDA1345 4
}; };
#endif /* _UDA134X_H */ #endif /* _UDA134X_H */
...@@ -431,6 +431,14 @@ SOC_ENUM("PCM Playback De-emphasis", uda134x_mixer_enum[1]), ...@@ -431,6 +431,14 @@ SOC_ENUM("PCM Playback De-emphasis", uda134x_mixer_enum[1]),
SOC_SINGLE("DC Filter Enable Switch", UDA134X_STATUS0, 0, 1, 0), SOC_SINGLE("DC Filter Enable Switch", UDA134X_STATUS0, 0, 1, 0),
}; };
static const struct snd_kcontrol_new uda1345_snd_controls[] = {
SOC_SINGLE("Master Playback Volume", UDA134X_DATA000, 0, 0x3F, 1),
SOC_ENUM("PCM Playback De-emphasis", uda134x_mixer_enum[1]),
SOC_SINGLE("DC Filter Enable Switch", UDA134X_STATUS0, 0, 1, 0),
};
static struct snd_soc_dai_ops uda134x_dai_ops = { static struct snd_soc_dai_ops uda134x_dai_ops = {
.startup = uda134x_startup, .startup = uda134x_startup,
.shutdown = uda134x_shutdown, .shutdown = uda134x_shutdown,
...@@ -486,6 +494,7 @@ static int uda134x_soc_probe(struct platform_device *pdev) ...@@ -486,6 +494,7 @@ static int uda134x_soc_probe(struct platform_device *pdev)
case UDA134X_UDA1340: case UDA134X_UDA1340:
case UDA134X_UDA1341: case UDA134X_UDA1341:
case UDA134X_UDA1344: case UDA134X_UDA1344:
case UDA134X_UDA1345:
break; break;
default: default:
printk(KERN_ERR "UDA134X SoC codec: " printk(KERN_ERR "UDA134X SoC codec: "
...@@ -551,6 +560,10 @@ static int uda134x_soc_probe(struct platform_device *pdev) ...@@ -551,6 +560,10 @@ static int uda134x_soc_probe(struct platform_device *pdev)
ret = snd_soc_add_controls(codec, uda1341_snd_controls, ret = snd_soc_add_controls(codec, uda1341_snd_controls,
ARRAY_SIZE(uda1341_snd_controls)); ARRAY_SIZE(uda1341_snd_controls));
break; break;
case UDA134X_UDA1345:
ret = snd_soc_add_controls(codec, uda1345_snd_controls,
ARRAY_SIZE(uda1345_snd_controls));
break;
default: default:
printk(KERN_ERR "%s unknown codec type: %d", printk(KERN_ERR "%s unknown codec type: %d",
__func__, pd->model); __func__, pd->model);
......
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