rk3168_86v: codec es8323

This commit is contained in:
hjc
2013-03-18 14:27:03 +08:00
parent 980f518539
commit d02a97f84a
4 changed files with 5 additions and 13 deletions

View File

@@ -32,6 +32,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_CX20442
select SND_SOC_DA7210 if I2C
select SND_SOC_DFBMCS320
select SND_SOC_ES8323 if SND_SOC_I2C_AND_SPI
select SND_SOC_JZ4740_CODEC if SOC_JZ4740
select SND_SOC_LM4857 if I2C
select SND_SOC_MAX98088 if I2C

View File

@@ -128,6 +128,7 @@ obj-$(CONFIG_SND_SOC_CX20442) += snd-soc-cx20442.o
obj-$(CONFIG_SND_SOC_DA7210) += snd-soc-da7210.o
obj-$(CONFIG_SND_SOC_DFBMCS320) += snd-soc-dfbmcs320.o
obj-$(CONFIG_SND_SOC_DMIC) += snd-soc-dmic.o
obj-$(CONFIG_SND_SOC_ES8323) += snd-soc-es8323.o
obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o
obj-$(CONFIG_SND_SOC_JZ4740_CODEC) += snd-soc-jz4740-codec.o
obj-$(CONFIG_SND_SOC_MAX98088) += snd-soc-max98088.o

View File

@@ -1424,7 +1424,7 @@ static DEVICE_ATTR(es8323, 0664, es8323_show, es8323_store);
static __devinit int es8323_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
printk("hjc:@es8323.c>>>>%s\n",__func__);
struct es8323_priv *es8323;
int ret = -1;
struct i2c_adapter *adapter = to_i2c_adapter(i2c->dev.parent);
@@ -1457,23 +1457,19 @@ static __devinit int es8323_i2c_probe(struct i2c_client *i2c,
ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_es8323, &es8323_dai, 1);
printk("hjc:@es8323.c,snd_soc_register_codec %s,ret=%d\n",__func__,ret);
if (ret < 0) {
kfree(es8323);
return ret;
}
printk("hjc:@es8323.c 1 %s,\n",__func__);
es8323_class = class_create(THIS_MODULE, "es8323");
printk("hjc:@es8323.c 2 %s,\n",__func__);
if (IS_ERR(es8323_class))
{
printk("Create class audio_es8323.\n");
return -ENOMEM;
}
printk("hjc:@es8323.c 3 %s,\n",__func__);
es8323_dev = device_create(es8323_class, NULL, MKDEV(0, 1), NULL, "dev");
device_create_file(es8323_dev, &dev_attr_es8323);
printk("hjc:@es8323.c 4 %s,\n",__func__);
return ret;
}
@@ -1640,7 +1636,6 @@ static int __init es8323_modinit(void)
//set_sound_card_exist(0x8323);
//set_codec_set_spk(es8323_codec_set_spk);
#endif
printk("hjc:@es8323.c>>>>%s\n",__func__);
return i2c_add_driver(&es8323_i2c_driver);
}
module_init(es8323_modinit);

View File

@@ -204,20 +204,15 @@ static int __init audio_card_init(void)
#endif
//leaf if(0 == tcsi_get_value(TCSI_CODEC_ES8323))
//leaf2012-7-26 return;
DBG("XXXXEnter::%s--1--%d\n",__FUNCTION__,__LINE__);
DBG("XXXXEnter::%s----%d\n",__FUNCTION__,__LINE__);
rk29_snd_device = platform_device_alloc("soc-audio", -1);
DBG("XXXXEnter::%s--2--%d\n",__FUNCTION__,__LINE__);
if (!rk29_snd_device) {
DBG("XXXXEnter::%s--3--%d\n",__FUNCTION__,__LINE__);
DBG("platform device allocation failed\n");
ret = -ENOMEM;
return ret;
}
DBG("XXXXEnter::%s--4--%d\n",__FUNCTION__,__LINE__);
platform_set_drvdata(rk29_snd_device, &snd_soc_card_rk29);
DBG("XXXXEnter::%s--5--%d\n",__FUNCTION__,__LINE__);
ret = platform_device_add(rk29_snd_device);
DBG("XXXXEnter::%s--6--%d\n",__FUNCTION__,__LINE__);
if (ret) {
DBG("platform device add failed\n");
platform_device_put(rk29_snd_device);