mirror of
https://xff.cz/git/u-boot/
synced 2025-09-25 12:31:17 +02:00
sound: Allow audio codecs to be used by other SoCs
At present there is still some samsung-specific code in the audio codecs. Remove it so that these can be used by other SoCs. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -32,7 +32,7 @@ config I2S_ROCKCHIP
|
|||||||
|
|
||||||
config I2S_SAMSUNG
|
config I2S_SAMSUNG
|
||||||
bool "Enable I2C support for Samsung SoCs"
|
bool "Enable I2C support for Samsung SoCs"
|
||||||
depends on SOUND
|
depends on I2S
|
||||||
help
|
help
|
||||||
Samsung Exynos SoCs support an I2S interface for sending audio
|
Samsung Exynos SoCs support an I2S interface for sending audio
|
||||||
data to an audio codec. This option enables support for this,
|
data to an audio codec. This option enables support for this,
|
||||||
@@ -42,7 +42,7 @@ config I2S_SAMSUNG
|
|||||||
|
|
||||||
config SOUND_MAX98088
|
config SOUND_MAX98088
|
||||||
bool "Support Maxim max98088 audio codec"
|
bool "Support Maxim max98088 audio codec"
|
||||||
depends on I2S_SAMSUNG
|
depends on I2S
|
||||||
help
|
help
|
||||||
Enable the max98088 audio codec. This is connected via I2S for
|
Enable the max98088 audio codec. This is connected via I2S for
|
||||||
audio data and I2C for codec control. At present it only works
|
audio data and I2C for codec control. At present it only works
|
||||||
@@ -50,7 +50,7 @@ config SOUND_MAX98088
|
|||||||
|
|
||||||
config SOUND_MAX98090
|
config SOUND_MAX98090
|
||||||
bool "Support Maxim max98090 audio codec"
|
bool "Support Maxim max98090 audio codec"
|
||||||
depends on I2S_SAMSUNG
|
depends on I2S
|
||||||
help
|
help
|
||||||
Enable the max98090 audio codec. This is connected via I2S for
|
Enable the max98090 audio codec. This is connected via I2S for
|
||||||
audio data and I2C for codec control. At present it only works
|
audio data and I2C for codec control. At present it only works
|
||||||
@@ -58,7 +58,7 @@ config SOUND_MAX98090
|
|||||||
|
|
||||||
config SOUND_MAX98095
|
config SOUND_MAX98095
|
||||||
bool "Support Maxim max98095 audio codec"
|
bool "Support Maxim max98095 audio codec"
|
||||||
depends on I2S_SAMSUNG
|
depends on I2S
|
||||||
help
|
help
|
||||||
Enable the max98095 audio codec. This is connected via I2S for
|
Enable the max98095 audio codec. This is connected via I2S for
|
||||||
audio data and I2C for codec control. At present it only works
|
audio data and I2C for codec control. At present it only works
|
||||||
|
@@ -16,10 +16,6 @@
|
|||||||
#include <i2s.h>
|
#include <i2s.h>
|
||||||
#include <sound.h>
|
#include <sound.h>
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/arch/clk.h>
|
|
||||||
#include <asm/arch/cpu.h>
|
|
||||||
#include <asm/arch/power.h>
|
|
||||||
#include "maxim_codec.h"
|
#include "maxim_codec.h"
|
||||||
#include "max98088.h"
|
#include "max98088.h"
|
||||||
|
|
||||||
@@ -288,9 +284,6 @@ static int max98088_device_init(struct maxim_priv *priv)
|
|||||||
unsigned char id;
|
unsigned char id;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
/* Enable codec clock */
|
|
||||||
set_xclkout();
|
|
||||||
|
|
||||||
/* reset the codec, the DSP core, and disable all interrupts */
|
/* reset the codec, the DSP core, and disable all interrupts */
|
||||||
error = max98088_reset(priv);
|
error = max98088_reset(priv);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
|
@@ -13,10 +13,6 @@
|
|||||||
#include <i2s.h>
|
#include <i2s.h>
|
||||||
#include <sound.h>
|
#include <sound.h>
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/arch/clk.h>
|
|
||||||
#include <asm/arch/cpu.h>
|
|
||||||
#include <asm/arch/power.h>
|
|
||||||
#include "maxim_codec.h"
|
#include "maxim_codec.h"
|
||||||
#include "max98090.h"
|
#include "max98090.h"
|
||||||
|
|
||||||
@@ -240,9 +236,6 @@ int max98090_device_init(struct maxim_priv *priv)
|
|||||||
unsigned char id;
|
unsigned char id;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
/* Enable codec clock */
|
|
||||||
set_xclkout();
|
|
||||||
|
|
||||||
/* reset the codec, the DSP core, and disable all interrupts */
|
/* reset the codec, the DSP core, and disable all interrupts */
|
||||||
error = max98090_reset(priv);
|
error = max98090_reset(priv);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
|
@@ -15,10 +15,6 @@
|
|||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include <sound.h>
|
#include <sound.h>
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/arch/clk.h>
|
|
||||||
#include <asm/arch/cpu.h>
|
|
||||||
#include <asm/arch/power.h>
|
|
||||||
#include "i2s.h"
|
#include "i2s.h"
|
||||||
#include "max98095.h"
|
#include "max98095.h"
|
||||||
|
|
||||||
@@ -306,9 +302,6 @@ static int max98095_device_init(struct maxim_priv *priv)
|
|||||||
unsigned char id;
|
unsigned char id;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Enable codec clock */
|
|
||||||
set_xclkout();
|
|
||||||
|
|
||||||
/* reset the codec, the DSP core, and disable all interrupts */
|
/* reset the codec, the DSP core, and disable all interrupts */
|
||||||
ret = max98095_reset(priv);
|
ret = max98095_reset(priv);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@@ -12,9 +12,6 @@
|
|||||||
#include <sound.h>
|
#include <sound.h>
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/arch/clk.h>
|
|
||||||
#include <asm/arch/cpu.h>
|
|
||||||
#include <asm/arch/power.h>
|
|
||||||
#include "maxim_codec.h"
|
#include "maxim_codec.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
#include <i2s.h>
|
#include <i2s.h>
|
||||||
#include <sound.h>
|
#include <sound.h>
|
||||||
#include <asm/gpio.h>
|
#include <asm/gpio.h>
|
||||||
|
#include <asm/arch/power.h>
|
||||||
|
|
||||||
static int samsung_sound_setup(struct udevice *dev)
|
static int samsung_sound_setup(struct udevice *dev)
|
||||||
{
|
{
|
||||||
@@ -79,6 +80,9 @@ static int samsung_sound_probe(struct udevice *dev)
|
|||||||
debug("Probed sound '%s' with codec '%s' and i2s '%s'\n", dev->name,
|
debug("Probed sound '%s' with codec '%s' and i2s '%s'\n", dev->name,
|
||||||
uc_priv->codec->name, uc_priv->i2s->name);
|
uc_priv->codec->name, uc_priv->i2s->name);
|
||||||
|
|
||||||
|
/* Enable codec clock */
|
||||||
|
set_xclkout();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user