From cbcfdf5c48a38330beb42fb30a0318cc86fa5791 Mon Sep 17 00:00:00 2001 From: Gary Zhang Date: Tue, 28 Aug 2012 17:15:42 +0800 Subject: ENGR00221689 wm8962: add wait time after enable power supply add 100ms wait time after enable power supply for power stability Signed-off-by: Gary Zhang --- sound/soc/codecs/wm8962.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 8558be580ee3..b14531157067 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -5,6 +5,7 @@ * * Author: Mark Brown * + * Copyright (C) 2012 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -4019,7 +4020,7 @@ static int wm8962_probe(struct snd_soc_codec *codec) dev_err(codec->dev, "Failed to enable supplies: %d\n", ret); goto err_get; } - + msleep(100); ret = snd_soc_read(codec, WM8962_SOFTWARE_RESET); if (ret < 0) { dev_err(codec->dev, "Failed to read ID register\n"); -- cgit v1.2.3 From 18c33d3fad9608532ac93efc6546f44aeb89de37 Mon Sep 17 00:00:00 2001 From: Alejandro Sierra Date: Tue, 28 Aug 2012 10:43:53 -0500 Subject: ENGR00221298 Fix tuner clock frequency on SSI Fix clock frequency configuration on SSI interface for the Tuner driver. Signed-off-by: Alejandro Sierra --- sound/soc/imx/imx-si4763.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/imx/imx-si4763.c b/sound/soc/imx/imx-si4763.c index 3bf7f0340ea9..1dd50e769235 100644 --- a/sound/soc/imx/imx-si4763.c +++ b/sound/soc/imx/imx-si4763.c @@ -94,7 +94,7 @@ static int imx_3stack_si4763_hw_params(struct snd_pcm_substream *substream, /* set the SSI system clock as input (unused) */ snd_soc_dai_set_sysclk(cpu_dai, IMX_SSP_SYS_CLK, 0, SND_SOC_CLOCK_IN); - snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PM, 9); + snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PM, 4); snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_2, 1); snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PSR, 0); return 0; -- cgit v1.2.3 From 26fdaae5e7112550f5ca75c5e4ee19b66f89ae82 Mon Sep 17 00:00:00 2001 From: Chen Liangjun Date: Tue, 21 Aug 2012 17:26:24 +0800 Subject: ENGR00182456-2 HDMI AUDIO: register/unregister when audio pcm open/close In this patch: 1. Register substream into HDMI core driver when HDMI audio PCM is open. 2. Unregister substream out of HDMI core driver when HDMI audio PCM is close. Signed-off-by: Chen Liangjun --- sound/soc/imx/imx-hdmi-dma.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sound') diff --git a/sound/soc/imx/imx-hdmi-dma.c b/sound/soc/imx/imx-hdmi-dma.c index f0afcf1ac52b..70c8cb13d3de 100644 --- a/sound/soc/imx/imx-hdmi-dma.c +++ b/sound/soc/imx/imx-hdmi-dma.c @@ -1195,6 +1195,12 @@ static int hdmi_dma_open(struct snd_pcm_substream *substream) (int)clk_get_rate(hdmi_dma_priv->isfr_clk), (int)clk_get_rate(hdmi_dma_priv->iahb_clk)); + ret = mxc_hdmi_register_audio(substream); + if (ret < 0) { + pr_err("ERROR: HDMI is not ready!\n"); + return ret; + } + hdmi_fifo_reset(); ret = snd_pcm_hw_constraint_integer(substream->runtime, @@ -1215,6 +1221,7 @@ static int hdmi_dma_close(struct snd_pcm_substream *substream) struct imx_hdmi_dma_runtime_data *rtd = runtime->private_data; hdmi_dma_irq_disable(rtd); + mxc_hdmi_unregister_audio(substream); clk_disable(rtd->iahb_clk); clk_disable(rtd->isfr_clk); -- cgit v1.2.3 From e6cd59ec61e8931f939d5b47d343ff8f4a4f1097 Mon Sep 17 00:00:00 2001 From: Nicolin Chen Date: Fri, 31 Aug 2012 13:54:45 +0800 Subject: ENGR00222836 Fix Kern BUG during Susp/Resu caused by SPDIF debug code dump_reg() in msc_spdif.c will cause kernel BUG during Suspend/Resume, because of calling clk_enable() in an interrupt for playback. There's also a simular issue in capture case. Capture'd be stopped after resume for suspending. Signed-off-by: Nicolin Chen --- sound/soc/codecs/mxc_spdif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/mxc_spdif.c b/sound/soc/codecs/mxc_spdif.c index 883aa4d26687..c80eed6d80d3 100644 --- a/sound/soc/codecs/mxc_spdif.c +++ b/sound/soc/codecs/mxc_spdif.c @@ -571,6 +571,7 @@ static int mxc_spdif_playback_start(struct snd_pcm_substream *substream, if (!plat_data->spdif_tx) return -EINVAL; + spdif_priv->tx_active = true; regval = __raw_readl(spdif_base_addr + SPDIF_REG_SCR); regval &= 0xfc33e3; regval &= ~SCR_LOW_POWER; @@ -715,9 +716,11 @@ static int mxc_spdif_capture_start(struct snd_pcm_substream *substream, struct mxc_spdif_platform_data *plat_data = spdif_priv->plat_data; unsigned long regval; - if (!plat_data->spdif_rx || !spdif_priv->rx_active) + if (!plat_data->spdif_rx) return -EINVAL; + spdif_priv->rx_active = true; + regval = __raw_readl(spdif_base_addr + SPDIF_REG_SCR); /* * initial and reset SPDIF configuration: -- cgit v1.2.3 From aa7eb2a5853b932e138546283bb7bae283ccec90 Mon Sep 17 00:00:00 2001 From: Chen Liangjun Date: Tue, 4 Sep 2012 16:51:41 +0800 Subject: ENGR00222900 HDMI AUDIO: fix kernel panic when doing suspend-resume test In MX6 series, HDMI audio driver is responsible for add IEC header to audio samples. Driver would maintain variables to cover this work. The old driver would cause memory access exceeding issue: 1. Resume from an playback. In this case, variable maintained by ALSA is updated while variable maintained by HDMI driver is not updated. The mmap copy operation would run into error state due to misalignment. 2. underrun!!! The same error would happens as the items above. In this patch, add variable check while adding IED header. Signed-off-by: Chen Liangjun --- sound/soc/imx/imx-hdmi-dma.c | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/imx/imx-hdmi-dma.c b/sound/soc/imx/imx-hdmi-dma.c index 70c8cb13d3de..45811429985f 100644 --- a/sound/soc/imx/imx-hdmi-dma.c +++ b/sound/soc/imx/imx-hdmi-dma.c @@ -597,9 +597,15 @@ static void hdmi_sdma_isr(void *data) if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { appl_bytes = frames_to_bytes(runtime, runtime->control->appl_ptr); + if (rtd->appl_bytes > appl_bytes) + rtd->appl_bytes = 0; offset = rtd->appl_bytes % rtd->buffer_bytes; space_to_end = rtd->buffer_bytes - offset; count = appl_bytes - rtd->appl_bytes; + if (count > rtd->buffer_bytes) { + pr_info("HDMI is slow,ring buffer size[%ld], count[%ld]!\n", + rtd->buffer_bytes, count); + } rtd->appl_bytes = appl_bytes; if (count <= space_to_end) { @@ -645,9 +651,15 @@ static irqreturn_t hdmi_dma_isr(int irq, void *dev_id) if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { appl_bytes = frames_to_bytes(runtime, runtime->control->appl_ptr); + if (rtd->appl_bytes > appl_bytes) + rtd->appl_bytes = 0; offset = rtd->appl_bytes % rtd->buffer_bytes; space_to_end = rtd->buffer_bytes - offset; count = appl_bytes - rtd->appl_bytes; + if (count > rtd->buffer_bytes) { + pr_info("HDMI is slow,ring buffer size[%ld],count[%ld]!\n", + rtd->buffer_bytes, count); + } rtd->appl_bytes = appl_bytes; if (count <= space_to_end) { @@ -1066,6 +1078,8 @@ static int hdmi_dma_hw_params(struct snd_pcm_substream *substream, /* Init par for mmap optimizate */ init_table(rtd->channels); + rtd->appl_bytes = 0; + return 0; } @@ -1073,6 +1087,7 @@ static int hdmi_dma_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_pcm_runtime *runtime = substream->runtime; struct imx_hdmi_dma_runtime_data *rtd = runtime->private_data; + unsigned long offset, count, space_to_end, appl_bytes; switch (cmd) { case SNDRV_PCM_TRIGGER_START: @@ -1080,11 +1095,34 @@ static int hdmi_dma_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: rtd->frame_idx = 0; if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { - rtd->appl_bytes = frames_to_bytes(runtime, + appl_bytes = frames_to_bytes(runtime, runtime->control->appl_ptr); + /* If resume, the rtd->appl_bytes may stil + * keep the old value but the control-> + * appl_ptr is clear. Reset it if this + * misalignment happens*/ + if (rtd->appl_bytes > appl_bytes) + rtd->appl_bytes = 0; + offset = rtd->appl_bytes % rtd->buffer_bytes; + space_to_end = rtd->buffer_bytes - offset; + count = appl_bytes - rtd->appl_bytes; - hdmi_dma_mmap_copy(substream, 0, rtd->appl_bytes); + if (count > rtd->buffer_bytes) { + pr_err("Error Count,ring buffer size[%ld], count[%ld]!\n", + rtd->buffer_bytes, count); + return -EINVAL; + } + rtd->appl_bytes = appl_bytes; + + if (count <= space_to_end) { + hdmi_dma_mmap_copy(substream, offset, count); + } else { + hdmi_dma_mmap_copy(substream, + offset, space_to_end); + hdmi_dma_mmap_copy(substream, + 0, count - space_to_end); + } } dumpregs(); -- cgit v1.2.3 From f4eed08ea165aa7dd13ebf93be12c71b05d77ed2 Mon Sep 17 00:00:00 2001 From: Gary Zhang Date: Wed, 12 Sep 2012 10:03:11 +0800 Subject: ENGR00223911 wm8962: correct typo correct typo for wm8962 description in Kconfig Signed-off-by: Gary Zhang --- sound/soc/imx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig index e4b57c7ea337..72d85503d495 100644 --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig @@ -70,12 +70,12 @@ config SND_SOC_IMX_WM8958 a WM8958 codec. config SND_SOC_IMX_WM8962 - tristate "SoC Audio support for IMX boards with WM8958" + tristate "SoC Audio support for IMX boards with WM8962" select SND_MXC_SOC_MX2 select SND_SOC_WM8962 help Say Y if you want to add support for SoC audio on an i.MX board with - a WM8958 codec. + a WM8962 codec. config SND_SOC_IMX_CS42888 tristate "SoC Audio support for i.MX boards with cs42888" -- cgit v1.2.3 From 0916af964b9deb5f7a17612772d0319bfcaa2a11 Mon Sep 17 00:00:00 2001 From: Gary Zhang Date: Wed, 12 Sep 2012 20:29:01 +0800 Subject: ENGR00224112 wm8962: correct lrclk mismatch lrclk trigger settings between ssi and wm8962 are different, which causes L/R channel swap. Signed-off-by: Gary Zhang --- sound/soc/imx/imx-wm8962.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound') diff --git a/sound/soc/imx/imx-wm8962.c b/sound/soc/imx/imx-wm8962.c index 8da589f2fa69..b13f68f2647b 100644 --- a/sound/soc/imx/imx-wm8962.c +++ b/sound/soc/imx/imx-wm8962.c @@ -111,6 +111,9 @@ static int imx_hifi_hw_params(struct snd_pcm_substream *substream, channels == 1 ? 0xfffffffe : 0xfffffffc, 2, 32); + dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | + SND_SOC_DAIFMT_CBM_CFM; + /* set cpu DAI configuration */ ret = snd_soc_dai_set_fmt(cpu_dai, dai_format); if (ret < 0) -- cgit v1.2.3 From 124f4882db739c49dc3c1f1795635244951d0ca0 Mon Sep 17 00:00:00 2001 From: Chen Liangjun Date: Wed, 12 Sep 2012 18:34:28 +0800 Subject: ENGR00223816 HDMI AUDIO: fix kernel panic cause by accessing unavailable memory HDMI audio driver is responsible for add IEC header into audio sample. In HDMI audio driver, a variable named rtd->appl_bytes is maintained to stand for how many audio sample have already processed. appl_bytes stands for how many audio sample the user space have already feed into kernel driver. So we use the connt = appl_bytes - rtd->appl_bytes to decide how many data need to be processed. And the processed data would be write into an preallocated buffer called hw_buf in driver. When doing seek operation, the appl_bytes changes in an wide range. So it is possible that the count value is far larger than the size of hw_buf and the memory access un-existed address error would happens. In this patch, Add check operation for count to avoid kernel panic. Kernel panic log: seeking: 0:00:18.000000000/0:03:0Unable to handle kernel paging request at virtual address ffdf0000 pgd = 80004000 [ffdf0000] *pgd=71e35811, *pte=00000000, *ppte=00000000 Internal error: Oops: 7 [#1] PREEMPT SMP Modules linked in: vivante drm galcore CPU: 0 Not tainted (3.0.35-2014-g7a9337b #1) PC is at hdmi_dma_mmap_copy+0x134/0x190 LR is at hdmi_dma_mmap_copy+0x5c/0x190 pc : [<803e1e4c>] lr : [<803e1d74>] psr: 800f0193 sp : 80a61e98 ip : ffdf0000 fp : ffdeffc0 r10: 00000055 r9 : ffdeff80 r8 : 0029b450 r7 : 00000060 r6 : ffdf0200 r5 : 00000240 r4 : 00000120 r3 : 00000000 r2 : ffdf0000 r1 : 00000000 r0 : 00000090 Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c53c7d Table: 6d28804a DAC: 00000015 Process swapper (pid: 0, stack limit = 0x80a602f0) Stack: (0x80a61e98 to 0x80a62000) 1e80: 00000002 000037f1 1ea0: 00006000 e1d3a7e4 a00f0193 e1d3a780 e1dcab00 00a83100 00a83100 00006000 1ec0: 00006000 803e24f4 413187b9 00000000 0073001a e1dd1e00 00000001 00000001 1ee0: 00000080 00000093 80ac7070 80a66a80 00000001 800a5ca8 8c80e568 efb3e7b9 1f00: 00000055 80a66a80 80a66acc e1ea9bc0 00000093 00000000 80a60000 00000000 1f20: 00000000 800a5e14 80a66a80 80a66acc 0000107f 800a8198 80a71cc0 80038c00 1f40: 80a60000 800a5610 000001f0 80040830 ffffffff f2a00100 00000093 00000002 1f60: 00000001 8003f9cc 80ac5f60 800f0093 00000001 00000000 80a60000 80abeb64 1f80: 804e1a54 80a74e7c 1000406a 412fc09a 00000000 00000000 00000000 80a61fb0 1fa0: 8004d52c 80040ac4 400f0013 ffffffff 80040aa0 80040cbc 00000001 80a71b3c 1fc0: 80abeac0 8002e3c4 8c80b140 80008868 800082f8 00000000 00000000 8002e3c4 1fe0: 00000000 10c53c7d 80a71a6c 8002e3c0 80a74e74 10008040 00000000 00000000 [<803e1e4c>] (hdmi_dma_mmap_copy+0x134/0x190) from [<803e24f4>] (hdmi_dma_isr+0x17c/0x1a0) [<803e24f4>] (hdmi_dma_isr+0x17c/0x1a0) from [<800a5ca8>] (handle_irq_event_percpu+0x50/0x180) [<800a5ca8>] (handle_irq_event_percpu+0x50/0x180) from [<800a5e14>] (handle_irq_event+0x3c/0x5c) [<800a5e14>] (handle_irq_event+0x3c/0x5c) from [<800a8198>] (handle_fasteoi_irq+0xbc/0x154) [<800a8198>] (handle_fasteoi_irq+0xbc/0x154) from [<800a5610>] (generic_handle_irq+0x28/0x3c) [<800a5610>] (generic_handle_irq+0x28/0x3c) from [<80040830>] (handle_IRQ+0x4c/0xac) [<80040830>] (handle_IRQ+0x4c/0xac) from [<8003f9cc>] (__irq_svc+0x4c/0xe8) [<8003f9cc>] (__irq_svc+0x4c/0xe8) from [<80040ac4>] (default_idle+0x24/0x28) [<80040ac4>] (default_idle+0x24/0x28) from [<80040cbc>] (cpu_idle+0xbc/0xfc) [<80040cbc>] (cpu_idle+0xbc/0xfc) from [<80008868>] (start_kernel+0x248/0x288) [<80008868>] (start_kernel+0x248/0x288) from [<10008040>] (0x10008040) Code: c1a0c009 c08b6005 c1a0200b da00000a (e0d230b2) Signed-off-by: Chen Liangjun --- sound/soc/imx/imx-hdmi-dma.c | 63 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 14 deletions(-) (limited to 'sound') diff --git a/sound/soc/imx/imx-hdmi-dma.c b/sound/soc/imx/imx-hdmi-dma.c index 45811429985f..ab0207a428d0 100644 --- a/sound/soc/imx/imx-hdmi-dma.c +++ b/sound/soc/imx/imx-hdmi-dma.c @@ -597,15 +597,27 @@ static void hdmi_sdma_isr(void *data) if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { appl_bytes = frames_to_bytes(runtime, runtime->control->appl_ptr); - if (rtd->appl_bytes > appl_bytes) - rtd->appl_bytes = 0; + + if (rtd->appl_bytes > appl_bytes) { + if (appl_bytes > rtd->buffer_bytes) + rtd->appl_bytes = + appl_bytes - rtd->buffer_bytes; + else + rtd->appl_bytes = 0; + } else { + if ((appl_bytes - rtd->appl_bytes) > + rtd->buffer_bytes) + rtd->appl_bytes = + appl_bytes - rtd->buffer_bytes; + + } + offset = rtd->appl_bytes % rtd->buffer_bytes; space_to_end = rtd->buffer_bytes - offset; count = appl_bytes - rtd->appl_bytes; - if (count > rtd->buffer_bytes) { - pr_info("HDMI is slow,ring buffer size[%ld], count[%ld]!\n", - rtd->buffer_bytes, count); - } + if (count > rtd->buffer_bytes) + count = rtd->buffer_bytes; + rtd->appl_bytes = appl_bytes; if (count <= space_to_end) { @@ -651,15 +663,25 @@ static irqreturn_t hdmi_dma_isr(int irq, void *dev_id) if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { appl_bytes = frames_to_bytes(runtime, runtime->control->appl_ptr); - if (rtd->appl_bytes > appl_bytes) - rtd->appl_bytes = 0; + if (rtd->appl_bytes > appl_bytes) { + if (appl_bytes > rtd->buffer_bytes) + rtd->appl_bytes = + appl_bytes - rtd->buffer_bytes; + else + rtd->appl_bytes = 0; + } else { + if ((appl_bytes - rtd->appl_bytes) > + rtd->buffer_bytes) + rtd->appl_bytes = + appl_bytes - rtd->buffer_bytes; + + } + offset = rtd->appl_bytes % rtd->buffer_bytes; space_to_end = rtd->buffer_bytes - offset; count = appl_bytes - rtd->appl_bytes; - if (count > rtd->buffer_bytes) { - pr_info("HDMI is slow,ring buffer size[%ld],count[%ld]!\n", - rtd->buffer_bytes, count); - } + if (count > rtd->buffer_bytes) + count = rtd->buffer_bytes; rtd->appl_bytes = appl_bytes; if (count <= space_to_end) { @@ -1101,8 +1123,20 @@ static int hdmi_dma_trigger(struct snd_pcm_substream *substream, int cmd) * keep the old value but the control-> * appl_ptr is clear. Reset it if this * misalignment happens*/ - if (rtd->appl_bytes > appl_bytes) - rtd->appl_bytes = 0; + if (rtd->appl_bytes > appl_bytes) { + if (appl_bytes > rtd->buffer_bytes) + rtd->appl_bytes = + appl_bytes - rtd->buffer_bytes; + else + rtd->appl_bytes = 0; + } else { + if ((appl_bytes - rtd->appl_bytes) > + rtd->buffer_bytes) + rtd->appl_bytes = + appl_bytes - rtd->buffer_bytes; + + } + offset = rtd->appl_bytes % rtd->buffer_bytes; space_to_end = rtd->buffer_bytes - offset; count = appl_bytes - rtd->appl_bytes; @@ -1123,6 +1157,7 @@ static int hdmi_dma_trigger(struct snd_pcm_substream *substream, int cmd) hdmi_dma_mmap_copy(substream, 0, count - space_to_end); } + } dumpregs(); -- cgit v1.2.3 From f8dd4f6fea093e46a30d5e438baa33702f626372 Mon Sep 17 00:00:00 2001 From: Chen Liangjun Date: Thu, 13 Sep 2012 21:28:11 +0800 Subject: ENGR00224245 HDMI AUDIO: stop/start PCM while unplug,blank/plug, unblank When unplug, blank happens, HDMI audio can't play properly. So in driver, audio pcm would be disconnected when event above happens. However, pulse audio can't process disconnect event properly and if an blank or unplug event happens, HDMI sink would lost and can't be back again. In this patch, instead of disconnecting audio PCM stream, triggering stop audio pcm while unplug and blank, triggering start again while plug and unblank if the audio pcm is triggerd stop in the unplug/blank event. Signed-off-by: Chen Liangjun --- sound/soc/imx/imx-hdmi-dma.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') diff --git a/sound/soc/imx/imx-hdmi-dma.c b/sound/soc/imx/imx-hdmi-dma.c index ab0207a428d0..74d45558c97d 100644 --- a/sound/soc/imx/imx-hdmi-dma.c +++ b/sound/soc/imx/imx-hdmi-dma.c @@ -1115,6 +1115,8 @@ static int hdmi_dma_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + if (!check_hdmi_state()) + return 0; rtd->frame_idx = 0; if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) { appl_bytes = frames_to_bytes(runtime, -- cgit v1.2.3 From 547bcf3ca2487a8a3df4c28c393a1588665230ee Mon Sep 17 00:00:00 2001 From: Chen Liangjun Date: Wed, 19 Sep 2012 13:30:27 +0800 Subject: ENGR00224938 HDMI audio: clear HDMI dma done bit before start HDMI hardware fix: signal of HDMI DMA DONE is hard connected to SDMA event line. SDMA event is triggered by edge. If the HDMI DMA done is already 1 before start, there would be no SDMA event being trigged after HDMI generates another HDMI DONE signal. In this patch, clear HDMI DONE bit before start HDMI audio DMA. Signed-off-by: Chen Liangjun --- sound/soc/imx/imx-hdmi-dma.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound') diff --git a/sound/soc/imx/imx-hdmi-dma.c b/sound/soc/imx/imx-hdmi-dma.c index 74d45558c97d..342f9c85f481 100644 --- a/sound/soc/imx/imx-hdmi-dma.c +++ b/sound/soc/imx/imx-hdmi-dma.c @@ -1110,6 +1110,7 @@ static int hdmi_dma_trigger(struct snd_pcm_substream *substream, int cmd) struct snd_pcm_runtime *runtime = substream->runtime; struct imx_hdmi_dma_runtime_data *rtd = runtime->private_data; unsigned long offset, count, space_to_end, appl_bytes; + unsigned int status; switch (cmd) { case SNDRV_PCM_TRIGGER_START: @@ -1166,6 +1167,9 @@ static int hdmi_dma_trigger(struct snd_pcm_substream *substream, int cmd) hdmi_fifo_reset(); udelay(1); + status = hdmi_dma_get_irq_status(); + hdmi_dma_clear_irq_status(status); + hdmi_dma_priv->tx_active = true; hdmi_dma_start(); hdmi_dma_irq_mask(0); -- cgit v1.2.3 From 18079ec20d80ecccf8279c70c9e67b6ebf8b3f22 Mon Sep 17 00:00:00 2001 From: Gary Zhang Date: Thu, 13 Sep 2012 17:33:41 +0800 Subject: ENGR00219882 wm8962: avoid the digital volume changed by user Wolfson suggests that digital volume should not be changed by user to avoid affecting SNR and dynamic range, and user should adjust analog volume. Signed-off-by: Gary Zhang --- sound/soc/codecs/wm8962.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index b14531157067..784b5957e37a 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -2218,8 +2218,6 @@ SOC_ENUM("Capture LHPF Mode", cap_lhpf_mode), SOC_DOUBLE_R_TLV("Sidetone Volume", WM8962_DAC_DSP_MIXING_1, WM8962_DAC_DSP_MIXING_2, 4, 12, 0, st_tlv), -SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8962_LEFT_DAC_VOLUME, - WM8962_RIGHT_DAC_VOLUME, 1, 127, 0, digital_tlv), SOC_SINGLE("DAC High Performance Switch", WM8962_ADC_DAC_CONTROL_2, 0, 1, 0), SOC_SINGLE("ADC High Performance Switch", WM8962_ADDITIONAL_CONTROL_1, -- cgit v1.2.3 From cf90a2ee429bf281273499993c18d9ebf0e4328c Mon Sep 17 00:00:00 2001 From: Gary Zhang Date: Thu, 27 Sep 2012 15:49:08 +0800 Subject: ENGR00226095-2 SPDIF: add HDMI AUDIO in device name in mx6_sl evk because HDMI AUDIO in mx6sl evk comes from SPDIF TX, change to HDMI AUDIO in device name. Signed-off-by: Gary Zhang --- sound/soc/imx/imx-spdif.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/imx/imx-spdif.c b/sound/soc/imx/imx-spdif.c index efee7696bfbb..13c97aeb0622 100644 --- a/sound/soc/imx/imx-spdif.c +++ b/sound/soc/imx/imx-spdif.c @@ -1,7 +1,7 @@ /* * ASoC S/PDIF driver for IMX development boards * - * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. + * Copyright (C) 2008-2012 Freescale Semiconductor, Inc. * * based on stmp3780_devb_spdif.c * @@ -119,6 +119,11 @@ static int __init imx_spdif_init(void) return -ENOMEM; } + if (machine_is_mx6sl_evk()) { + imx_spdif_dai_link.name = "HDMI-Audio"; + imx_spdif_dai_link.stream_name = "HDMI-Audio"; + } + platform_set_drvdata(imx_spdif_snd_device, &snd_soc_card_imx_spdif); ret = platform_device_add(imx_spdif_snd_device); -- cgit v1.2.3