mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-29 17:55:48 +00:00
dm: sound: Drop codec_type
This field is not really used. It is always set to a known value. Drop it to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ccf0425e32
commit
7153ad834f
3 changed files with 0 additions and 33 deletions
|
@ -24,12 +24,7 @@
|
||||||
#include "i2s.h"
|
#include "i2s.h"
|
||||||
#include "max98095.h"
|
#include "max98095.h"
|
||||||
|
|
||||||
enum max98095_type {
|
|
||||||
MAX98095,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct max98095_priv {
|
struct max98095_priv {
|
||||||
enum max98095_type devtype;
|
|
||||||
unsigned int sysclk;
|
unsigned int sysclk;
|
||||||
unsigned int rate;
|
unsigned int rate;
|
||||||
unsigned int fmt;
|
unsigned int fmt;
|
||||||
|
@ -484,14 +479,6 @@ static int max98095_do_init(struct sound_codec_info *pcodec_info,
|
||||||
/* shift the device address by 1 for 7 bit addressing */
|
/* shift the device address by 1 for 7 bit addressing */
|
||||||
g_max98095_i2c_dev_addr = pcodec_info->i2c_dev_addr >> 1;
|
g_max98095_i2c_dev_addr = pcodec_info->i2c_dev_addr >> 1;
|
||||||
|
|
||||||
if (pcodec_info->codec_type == CODEC_MAX_98095) {
|
|
||||||
g_max98095_info.devtype = MAX98095;
|
|
||||||
} else {
|
|
||||||
debug("%s: Codec id [%d] not defined\n", __func__,
|
|
||||||
pcodec_info->codec_type);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = max98095_device_init(&g_max98095_info, aif_id);
|
ret = max98095_device_init(&g_max98095_info, aif_id);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
debug("%s: max98095 codec chip init failed\n", __func__);
|
debug("%s: max98095 codec chip init failed\n", __func__);
|
||||||
|
@ -555,7 +542,6 @@ static int get_max98095_codec_values(struct sound_codec_info *pcodec_info,
|
||||||
debug("%s: Unknown compat id %d\n", __func__, compat);
|
debug("%s: Unknown compat id %d\n", __func__, compat);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
pcodec_info->codec_type = CODEC_MAX_98095;
|
|
||||||
if (error == -1) {
|
if (error == -1) {
|
||||||
debug("fail to get max98095 codec node properties\n");
|
debug("fail to get max98095 codec node properties\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -847,8 +847,6 @@ static int get_codec_values(struct sound_codec_info *pcodec_info,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pcodec_info->codec_type = CODEC_WM_8994;
|
|
||||||
|
|
||||||
if (error == -1) {
|
if (error == -1) {
|
||||||
debug("fail to get wm8994 codec node properties\n");
|
debug("fail to get wm8994 codec node properties\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -875,14 +873,6 @@ int wm8994_init(const void *blob, enum en_audio_interface aif_id,
|
||||||
g_wm8994_i2c_dev_addr = pcodec_info->i2c_dev_addr;
|
g_wm8994_i2c_dev_addr = pcodec_info->i2c_dev_addr;
|
||||||
wm8994_i2c_init(pcodec_info->i2c_bus);
|
wm8994_i2c_init(pcodec_info->i2c_bus);
|
||||||
|
|
||||||
if (pcodec_info->codec_type == CODEC_WM_8994) {
|
|
||||||
g_wm8994_info.type = WM8994;
|
|
||||||
} else {
|
|
||||||
debug("%s: Codec id [%d] not defined\n", __func__,
|
|
||||||
pcodec_info->codec_type);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = wm8994_device_init(&g_wm8994_info, aif_id);
|
ret = wm8994_device_init(&g_wm8994_info, aif_id);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
debug("%s: wm8994 codec chip init failed\n", __func__);
|
debug("%s: wm8994 codec chip init failed\n", __func__);
|
||||||
|
|
|
@ -7,14 +7,6 @@
|
||||||
#ifndef __SOUND_H__
|
#ifndef __SOUND_H__
|
||||||
#define __SOUND_H__
|
#define __SOUND_H__
|
||||||
|
|
||||||
/* sound codec enum */
|
|
||||||
enum sound_codec {
|
|
||||||
CODEC_WM_8994,
|
|
||||||
CODEC_WM_8995,
|
|
||||||
CODEC_MAX_98095,
|
|
||||||
CODEC_MAX
|
|
||||||
};
|
|
||||||
|
|
||||||
/* sound codec enum */
|
/* sound codec enum */
|
||||||
enum sound_compat {
|
enum sound_compat {
|
||||||
AUDIO_COMPAT_SPI,
|
AUDIO_COMPAT_SPI,
|
||||||
|
@ -25,7 +17,6 @@ enum sound_compat {
|
||||||
struct sound_codec_info {
|
struct sound_codec_info {
|
||||||
int i2c_bus;
|
int i2c_bus;
|
||||||
int i2c_dev_addr;
|
int i2c_dev_addr;
|
||||||
enum sound_codec codec_type;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue