rk3168_86v: codec es8323
authorhjc <hjc@rock-chips.com>
Mon, 18 Mar 2013 06:27:03 +0000 (14:27 +0800)
committerhjc <hjc@rock-chips.com>
Mon, 18 Mar 2013 06:27:03 +0000 (14:27 +0800)
sound/soc/codecs/Kconfig
sound/soc/codecs/Makefile
sound/soc/codecs/es8323.c
sound/soc/rk29/rk29_es8323.c

index a88b11186b8b395575dc1e3cd2cddbf2954d9e46..c94983fd09da6da45745435b12b0e74cc4bfd4a4 100755 (executable)
@@ -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
index 3f515b93e105e58da1857eb8372a0fea10233ce4..df8ecc7d143b5a139b284e1957024291c963bf76 100755 (executable)
@@ -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
index dca2a8f5aa188447fa2079fe4fecb7bed4c59a35..2ad5ce842765803bd13271c58a31086b8e192b0a 100755 (executable)
@@ -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);
index d1cd4215e44d94fc2cffe700a9ae9f0e9de6e3e5..f8e66af06e04a9318ed42ca13d04e2d0f4a902ac 100755 (executable)
@@ -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);