Changeset 22776


Ignore:
Timestamp:
2010-08-23T01:21:11+02:00 (6 years ago)
Author:
lars
Message:

[xburst] Fix n5x6 sound drivers

Location:
trunk/target/linux/xburst/patches-2.6.35
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/xburst/patches-2.6.35/066-n516-sound.patch

    r22463 r22776  
    2222+       depends on SND_JZ4740_SOC && JZ4740_N516 
    2323+       select SND_JZ4740_SOC_I2S 
    24 +    select SND_SOC_JZCODEC 
     24+    select SND_SOC_JZ4740_CODEC 
    2525+       help 
    2626+         Say Y if you want to enable support for SoC audio on the Hanvon N516. 
     
    3737--- /dev/null 
    3838+++ b/sound/soc/jz4740/n516.c 
    39 @@ -0,0 +1,303 @@ 
     39@@ -0,0 +1,288 @@ 
    4040+/* 
    4141+ * Copyright (C) 2009, Yauhen Kharuzhy <jekhor@gmail.com> 
     
    6464+#include <linux/workqueue.h> 
    6565+ 
    66 +#include "../codecs/jzcodec.h" 
     66+#include "../codecs/jz4740.h" 
    6767+#include "jz4740-pcm.h" 
    6868+#include "jz4740-i2s.h" 
     
    179179+       int ret; 
    180180+       struct snd_soc_dai *cpu_dai = codec->socdev->card->dai_link->cpu_dai; 
    181 +       struct snd_soc_dai *codec_dai = codec->socdev->card->dai_link->codec_dai; 
    182181+ 
    183182+       n516_codec = codec; 
     
    185184+       snd_soc_dapm_nc_pin(codec, "LIN"); 
    186185+       snd_soc_dapm_nc_pin(codec, "RIN"); 
    187 + 
    188 +       ret = snd_soc_dai_set_fmt(codec_dai, N516_DAIFMT); 
    189 +       if (ret < 0) { 
    190 +               dev_err(codec->dev, "Failed to set codec dai format: %d\n", ret); 
    191 +               return ret; 
    192 +       } 
    193186+ 
    194187+       ret = snd_soc_dai_set_fmt(cpu_dai, N516_DAIFMT); 
     
    198191+       } 
    199192+ 
    200 +       ret = snd_soc_dai_set_sysclk(codec_dai, JZCODEC_SYSCLK, 111, 
    201 +               SND_SOC_CLOCK_IN); 
    202 +       if (ret < 0) { 
    203 +               dev_err(codec->dev, "Failed to set codec dai sysclk: %d\n", ret); 
    204 +               return ret; 
    205 +       } 
    206 + 
    207193+       ret = snd_soc_add_controls(codec, n516_controls, 
    208194+               ARRAY_SIZE(n516_controls)); 
     
    212198+       } 
    213199+ 
    214 + 
    215200+       ret = snd_soc_dapm_new_controls(codec, n516_widgets, 
    216201+               ARRAY_SIZE(n516_widgets)); 
     
    233218+static struct snd_soc_dai_link n516_dai = { 
    234219+       .name = "jz-codec", 
    235 +       .stream_name = "JZCODEC", 
     220+       .stream_name = "jz4740", 
    236221+       .cpu_dai = &jz4740_i2s_dai, 
    237 +       .codec_dai = &jz_codec_dai, 
     222+       .codec_dai = &jz4740_codec_dai, 
    238223+       .init = n516_codec_init, 
    239224+}; 
     
    248233+static struct snd_soc_device n516_snd_devdata = { 
    249234+       .card = &n516_card, 
    250 +       .codec_dev = &soc_codec_dev_jzcodec, 
     235+       .codec_dev = &soc_codec_dev_jz4740_codec, 
    251236+}; 
    252237+ 
  • trunk/target/linux/xburst/patches-2.6.35/067-n526-sound.patch

    r22463 r22776  
    1414+++ b/sound/soc/jz4740/Kconfig 
    1515@@ -29,3 +29,11 @@ config SND_JZ4740_SOC_N516 
    16      select SND_SOC_JZCODEC 
     16     select SND_SOC_JZ4740_CODEC 
    1717        help 
    1818          Say Y if you want to enable support for SoC audio on the Hanvon N516. 
     
    2222+       depends on SND_JZ4740_SOC && JZ4740_N526 
    2323+       select SND_JZ4740_SOC_I2S 
    24 +    select SND_SOC_JZCODEC 
     24+    select SND_SOC_JZ4740_CODEC 
    2525+       help 
    2626+         Say Y if you want to enable support for SoC audio on the Hanvon N526. 
     
    3838--- /dev/null 
    3939+++ b/sound/soc/jz4740/n526.c 
    40 @@ -0,0 +1,169 @@ 
     40@@ -0,0 +1,155 @@ 
    4141+/* 
    4242+ * Copyright (C) 2009, Lars-Peter Clausen <lars@metafoo.de> 
     
    6363+#include <linux/gpio.h> 
    6464+ 
    65 +#include "../codecs/jzcodec.h" 
     65+#include "../codecs/jz4740.h" 
    6666+#include "jz4740-pcm.h" 
    6767+#include "jz4740-i2s.h" 
     
    102102+       int ret; 
    103103+       struct snd_soc_dai *cpu_dai = codec->socdev->card->dai_link->cpu_dai; 
    104 +       struct snd_soc_dai *codec_dai = codec->socdev->card->dai_link->codec_dai; 
    105104+ 
    106105+       snd_soc_dapm_nc_pin(codec, "LIN"); 
    107106+       snd_soc_dapm_nc_pin(codec, "RIN"); 
    108107+ 
    109 +       ret = snd_soc_dai_set_fmt(codec_dai, N526_DAIFMT); 
    110 +       if (ret < 0) { 
    111 +               dev_err(codec->dev, "Failed to set codec dai format: %d\n", ret); 
    112 +               return ret; 
    113 +       } 
    114 + 
    115108+       ret = snd_soc_dai_set_fmt(cpu_dai, N526_DAIFMT); 
    116109+       if (ret < 0) { 
    117110+               dev_err(codec->dev, "Failed to set cpu dai format: %d\n", ret); 
    118 +               return ret; 
    119 +       } 
    120 + 
    121 +       ret = snd_soc_dai_set_sysclk(codec_dai, JZCODEC_SYSCLK, 111, 
    122 +               SND_SOC_CLOCK_IN); 
    123 +       if (ret < 0) { 
    124 +               dev_err(codec->dev, "Failed to set codec dai sysclk: %d\n", ret); 
    125111+               return ret; 
    126112+       } 
     
    140126+static struct snd_soc_dai_link n526_dai = { 
    141127+       .name = "jz-codec", 
    142 +       .stream_name = "JZCODEC", 
     128+       .stream_name = "jz4740", 
    143129+       .cpu_dai = &jz4740_i2s_dai, 
    144 +       .codec_dai = &jz_codec_dai, 
     130+       .codec_dai = &jz4740_codec_dai, 
    145131+       .init = n526_codec_init, 
    146132+}; 
     
    155141+static struct snd_soc_device n526_snd_devdata = { 
    156142+       .card = &n526, 
    157 +       .codec_dev = &soc_codec_dev_jzcodec, 
     143+       .codec_dev = &soc_codec_dev_jz4740_codec, 
    158144+}; 
    159145+ 
Note: See TracChangeset for help on using the changeset viewer.