]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 18:32:54 +0000 (10:32 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 18:32:54 +0000 (10:32 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (348 commits)
  ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
  ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO
  ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO
  ALSA: oxygen: fix Xonar DG input
  ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low
  ALSA: hda - Fix missing EAPD for Acer 4930G
  ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs.
  ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser
  ALSA: hda - Don't refer ELD when unplugged
  ASoC: tpa6130a2: Fix compiler warning
  ASoC: tlv320dac33: Add DAPM selection for LOM invert
  ASoC: DMIC codec: Adding a generic DMIC codec
  ALSA: snd-usb-us122l: Fix missing NULL checks
  ALSA: snd-usb-us122l: Fix MIDI output
  ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
  ASoC: Fix section mismatch in wm8995.c
  ALSA: oxygen: add S/PDIF source selection for Claro cards
  ALSA: oxygen: fix CD/MIDI for X-Meridian (2G)
  ASoC: fix migor audio build
  ALSA: include delay.h for msleep in Xonar DG support
  ...

1  2 
MAINTAINERS
arch/arm/mach-shmobile/board-ap4evb.c
drivers/regulator/wm8994-regulator.c
drivers/video/sh_mobile_hdmi.c
sound/core/pcm_native.c
sound/soc/codecs/max98088.c
sound/soc/samsung/smdk_spdif.c

diff --cc MAINTAINERS
index 78162c4f9544c0a8fd5f384b3f076909e9dfaf54,be9c708aac7825dbef1bd6ac5ceb4a92fa5f0800..3dd5c6fce989df9f9aa660ac97ffa9540a4232a2
@@@ -5283,20 -5176,8 +5319,20 @@@ SAMSUNG AUDIO (ASoC) DRIVER
  M:    Jassi Brar <jassi.brar@samsung.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
- F:    sound/soc/s3c24xx
+ F:    sound/soc/samsung
  
 +TIMEKEEPING, NTP
 +M:    John Stultz <johnstul@us.ibm.com>
 +M:    Thomas Gleixner <tglx@linutronix.de>
 +S:    Supported
 +F:    include/linux/clocksource.h
 +F:    include/linux/time.h
 +F:    include/linux/timex.h
 +F:    include/linux/timekeeping.h
 +F:    kernel/time/clocksource.c
 +F:    kernel/time/time*.c
 +F:    kernel/time/ntp.c
 +
  TLG2300 VIDEO4LINUX-2 DRIVER
  M:    Huang Shijie <shijie8@gmail.com>
  M:    Kang Yong <kangyong@telegent.com>
Simple merge
index 594f88eb60c3390b581abda36b7987261826bf65,21fefef02a43a1bd89eb5eb0169c0b4f5eac30ef..35b2958d51064a84950deef280a14603b1e4e0da
@@@ -133,10 -136,17 +135,17 @@@ static int wm8994_ldo2_list_voltage(str
        if (selector > WM8994_LDO2_MAX_SELECTOR)
                return -EINVAL;
  
-       return (selector * 100000) + 900000;
+       switch (ldo->wm8994->type) {
+       case WM8994:
+               return (selector * 100000) + 900000;
+       case WM8958:
+               return (selector * 100000) + 1000000;
+       default:
+               return -EINVAL;
+       }
  }
  
 -static int wm8994_ldo2_get_voltage(struct regulator_dev *rdev)
 +static int wm8994_ldo2_get_voltage_sel(struct regulator_dev *rdev)
  {
        struct wm8994_ldo *ldo = rdev_get_drvdata(rdev);
        int val;
Simple merge
Simple merge
Simple merge
index 0000000000000000000000000000000000000000,cb2f4d04ab7ec73f716914df7161c83ef97713d1..b5c3fad01bb8cd0a8e1b3efeddf1bf50a1e636db
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,226 +1,226 @@@
 -      /* Set audio clock heirachy for S/PDIF */
+ /*
+  * smdk_spdif.c  --  S/PDIF audio for SMDK
+  *
+  * Copyright 2010 Samsung Electronics Co. Ltd.
+  *
+  * This program is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU General Public License as
+  * published by the Free Software Foundation; either version 2 of the
+  * License, or (at your option) any later version.
+  *
+  */
+ #include <linux/module.h>
+ #include <linux/device.h>
+ #include <linux/clk.h>
+ #include <plat/devs.h>
+ #include <sound/soc.h>
+ #include "dma.h"
+ #include "spdif.h"
+ /* Audio clock settings are belonged to board specific part. Every
+  * board can set audio source clock setting which is matched with H/W
+  * like this function-'set_audio_clock_heirachy'.
+  */
+ static int set_audio_clock_heirachy(struct platform_device *pdev)
+ {
+       struct clk *fout_epll, *mout_epll, *sclk_audio0, *sclk_spdif;
+       int ret = 0;
+       fout_epll = clk_get(NULL, "fout_epll");
+       if (IS_ERR(fout_epll)) {
+               printk(KERN_WARNING "%s: Cannot find fout_epll.\n",
+                               __func__);
+               return -EINVAL;
+       }
+       mout_epll = clk_get(NULL, "mout_epll");
+       if (IS_ERR(mout_epll)) {
+               printk(KERN_WARNING "%s: Cannot find mout_epll.\n",
+                               __func__);
+               ret = -EINVAL;
+               goto out1;
+       }
+       sclk_audio0 = clk_get(&pdev->dev, "sclk_audio");
+       if (IS_ERR(sclk_audio0)) {
+               printk(KERN_WARNING "%s: Cannot find sclk_audio.\n",
+                               __func__);
+               ret = -EINVAL;
+               goto out2;
+       }
+       sclk_spdif = clk_get(NULL, "sclk_spdif");
+       if (IS_ERR(sclk_spdif)) {
+               printk(KERN_WARNING "%s: Cannot find sclk_spdif.\n",
+                               __func__);
+               ret = -EINVAL;
+               goto out3;
+       }
 - * clock of it's heirachy.
++      /* Set audio clock hierarchy for S/PDIF */
+       clk_set_parent(mout_epll, fout_epll);
+       clk_set_parent(sclk_audio0, mout_epll);
+       clk_set_parent(sclk_spdif, sclk_audio0);
+       clk_put(sclk_spdif);
+ out3:
+       clk_put(sclk_audio0);
+ out2:
+       clk_put(mout_epll);
+ out1:
+       clk_put(fout_epll);
+       return ret;
+ }
+ /* We should haved to set clock directly on this part because of clock
+  * scheme of Samsudng SoCs did not support to set rates from abstrct
 -      /* Set audio clock heirachy manually */
++ * clock of it's hierarchy.
+  */
+ static int set_audio_clock_rate(unsigned long epll_rate,
+                               unsigned long audio_rate)
+ {
+       struct clk *fout_epll, *sclk_spdif;
+       fout_epll = clk_get(NULL, "fout_epll");
+       if (IS_ERR(fout_epll)) {
+               printk(KERN_ERR "%s: failed to get fout_epll\n", __func__);
+               return -ENOENT;
+       }
+       clk_set_rate(fout_epll, epll_rate);
+       clk_put(fout_epll);
+       sclk_spdif = clk_get(NULL, "sclk_spdif");
+       if (IS_ERR(sclk_spdif)) {
+               printk(KERN_ERR "%s: failed to get sclk_spdif\n", __func__);
+               return -ENOENT;
+       }
+       clk_set_rate(sclk_spdif, audio_rate);
+       clk_put(sclk_spdif);
+       return 0;
+ }
+ static int smdk_hw_params(struct snd_pcm_substream *substream,
+               struct snd_pcm_hw_params *params)
+ {
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       unsigned long pll_out, rclk_rate;
+       int ret, ratio;
+       switch (params_rate(params)) {
+       case 44100:
+               pll_out = 45158400;
+               break;
+       case 32000:
+       case 48000:
+       case 96000:
+               pll_out = 49152000;
+               break;
+       default:
+               return -EINVAL;
+       }
+       /* Setting ratio to 512fs helps to use S/PDIF with HDMI without
+        * modify S/PDIF ASoC machine driver.
+        */
+       ratio = 512;
+       rclk_rate = params_rate(params) * ratio;
+       /* Set audio source clock rates */
+       ret = set_audio_clock_rate(pll_out, rclk_rate);
+       if (ret < 0)
+               return ret;
+       /* Set S/PDIF uses internal source clock */
+       ret = snd_soc_dai_set_sysclk(cpu_dai, SND_SOC_SPDIF_INT_MCLK,
+                                       rclk_rate, SND_SOC_CLOCK_IN);
+       if (ret < 0)
+               return ret;
+       return ret;
+ }
+ static struct snd_soc_ops smdk_spdif_ops = {
+       .hw_params = smdk_hw_params,
+ };
+ static struct snd_soc_dai_link smdk_dai = {
+       .name = "S/PDIF",
+       .stream_name = "S/PDIF PCM Playback",
+       .platform_name = "samsung-audio",
+       .cpu_dai_name = "samsung-spdif",
+       .codec_dai_name = "dit-hifi",
+       .codec_name = "spdif-dit",
+       .ops = &smdk_spdif_ops,
+ };
+ static struct snd_soc_card smdk = {
+       .name = "SMDK-S/PDIF",
+       .dai_link = &smdk_dai,
+       .num_links = 1,
+ };
+ static struct platform_device *smdk_snd_spdif_dit_device;
+ static struct platform_device *smdk_snd_spdif_device;
+ static int __init smdk_init(void)
+ {
+       int ret;
+       smdk_snd_spdif_dit_device = platform_device_alloc("spdif-dit", -1);
+       if (!smdk_snd_spdif_dit_device)
+               return -ENOMEM;
+       ret = platform_device_add(smdk_snd_spdif_dit_device);
+       if (ret)
+               goto err1;
+       smdk_snd_spdif_device = platform_device_alloc("soc-audio", -1);
+       if (!smdk_snd_spdif_device) {
+               ret = -ENOMEM;
+               goto err2;
+       }
+       platform_set_drvdata(smdk_snd_spdif_device, &smdk);
+       ret = platform_device_add(smdk_snd_spdif_device);
+       if (ret)
+               goto err3;
++      /* Set audio clock hierarchy manually */
+       ret = set_audio_clock_heirachy(smdk_snd_spdif_device);
+       if (ret)
+               goto err4;
+       return 0;
+ err4:
+       platform_device_del(smdk_snd_spdif_device);
+ err3:
+       platform_device_put(smdk_snd_spdif_device);
+ err2:
+       platform_device_del(smdk_snd_spdif_dit_device);
+ err1:
+       platform_device_put(smdk_snd_spdif_dit_device);
+       return ret;
+ }
+ static void __exit smdk_exit(void)
+ {
+       platform_device_unregister(smdk_snd_spdif_device);
+       platform_device_unregister(smdk_snd_spdif_dit_device);
+ }
+ module_init(smdk_init);
+ module_exit(smdk_exit);
+ MODULE_AUTHOR("Seungwhan Youn, <sw.youn@samsung.com>");
+ MODULE_DESCRIPTION("ALSA SoC SMDK+S/PDIF");
+ MODULE_LICENSE("GPL");