From e16605855d58803fe0608417150c7a618b4f8243 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 21 Mar 2012 13:22:40 +0000 Subject: ASoC: wm8994: Update WM8994 DCS calibration Based on latest production information. Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- sound/soc/codecs/wm8994.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 9685dff44dd8..10d27890eed5 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -3652,7 +3652,7 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) case 2: case 3: wm8994->hubs.dcs_codes_l = -9; - wm8994->hubs.dcs_codes_r = -5; + wm8994->hubs.dcs_codes_r = -7; break; default: break; -- cgit v1.2.3 From 26acaf08556a3c64ebf8ea3654b51e6acbb0a26c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 22 Mar 2012 14:36:50 +0100 Subject: ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pin The recent Realtek driver tries to assign an extra input via the headphone plug when only a single input source is found. The code worked on Samsung Q1, but it broke ASUS 1015 where the mic is a digital-mic and only a specific ADC works. This patch fixes the assignment of ADC in the shared mic/hp case. Instead of assuming the single ADC at first, reduce the ADCs after trying to assign both mic and HP pins. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42973 Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8ea2fd654327..9917e55d6f11 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2717,9 +2717,6 @@ static int alc_auto_fill_adc_caps(struct hda_codec *codec) int max_nums = ARRAY_SIZE(spec->private_adc_nids); int i, nums = 0; - if (spec->shared_mic_hp) - max_nums = 1; /* no multi streams with the shared HP/mic */ - nid = codec->start_nid; for (i = 0; i < codec->num_nodes; i++, nid++) { hda_nid_t src; @@ -4076,6 +4073,7 @@ static void alc_remove_invalid_adc_nids(struct hda_codec *codec) if (spec->dyn_adc_switch) return; + again: nums = 0; for (n = 0; n < spec->num_adc_nids; n++) { hda_nid_t cap = spec->private_capsrc_nids[n]; @@ -4096,6 +4094,11 @@ static void alc_remove_invalid_adc_nids(struct hda_codec *codec) if (!nums) { /* check whether ADC-switch is possible */ if (!alc_check_dyn_adc_switch(codec)) { + if (spec->shared_mic_hp) { + spec->shared_mic_hp = 0; + spec->private_imux[0].num_items = 1; + goto again; + } printk(KERN_WARNING "hda_codec: %s: no valid ADC found;" " using fallback 0x%x\n", codec->chip_name, spec->private_adc_nids[0]); @@ -4113,7 +4116,7 @@ static void alc_remove_invalid_adc_nids(struct hda_codec *codec) if (spec->auto_mic) alc_auto_mic_check_imux(codec); /* check auto-mic setups */ - else if (spec->input_mux->num_items == 1) + else if (spec->input_mux->num_items == 1 || spec->shared_mic_hp) spec->num_adc_nids = 1; /* reduce to a single ADC */ } -- cgit v1.2.3 From 4a163c82d600e554ef79e931db6315026e1fc819 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Thu, 22 Mar 2012 10:19:03 -0300 Subject: ASoC: Add extra parameter to device_prep_dma_cyclic Since commit 185ecb5 (dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic) prep_dma_cyclic() got an extra context parameter. Add this new parameter in order to fix the following build error (mxs_defconfig and imx_v4_v5_defconfig): sound/soc/soc-dmaengine-pcm.c:149:3: error: too few arguments to function 'chan->device->device_prep_dma_cyclic' Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- sound/soc/soc-dmaengine-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c index 4420b7030c83..76c038b4a970 100644 --- a/sound/soc/soc-dmaengine-pcm.c +++ b/sound/soc/soc-dmaengine-pcm.c @@ -146,7 +146,7 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream) desc = chan->device->device_prep_dma_cyclic(chan, substream->runtime->dma_addr, snd_pcm_lib_buffer_bytes(substream), - snd_pcm_lib_period_bytes(substream), direction); + snd_pcm_lib_period_bytes(substream), direction, NULL); if (!desc) return -ENOMEM; -- cgit v1.2.3 From 41ba6b711a40b83a877ae8242a4b3e692de91f97 Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Mon, 26 Mar 2012 17:28:08 +0530 Subject: ASoC: dmaengine_pcm: use dmaengine cyclic wrapper commit 4a163c82 added extra parameter to device_prep_dma_cyclic this is not required if we use the wrapper over cyclic API. This is split from Alexedre's patch Signed-off-by: Vinod Koul Signed-off-by: Mark Brown --- sound/soc/soc-dmaengine-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c index 76c038b4a970..475695234b3d 100644 --- a/sound/soc/soc-dmaengine-pcm.c +++ b/sound/soc/soc-dmaengine-pcm.c @@ -143,10 +143,10 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream) direction = snd_pcm_substream_to_dma_direction(substream); prtd->pos = 0; - desc = chan->device->device_prep_dma_cyclic(chan, + desc = dmaengine_prep_dma_cyclic(chan, substream->runtime->dma_addr, snd_pcm_lib_buffer_bytes(substream), - snd_pcm_lib_period_bytes(substream), direction, NULL); + snd_pcm_lib_period_bytes(substream), direction); if (!desc) return -ENOMEM; -- cgit v1.2.3 From a938fb1ef600c885f80e59b840a60894d16efb77 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 28 Mar 2012 09:57:02 +0300 Subject: ALSA: asihpi - fix return type of hpios_locked_mem_alloc() This function returns zero or -ENOMEM, but because it's type is u16, the -ENOMEM gets changed to 65524. None of the callers care, but lets fix it anyway as a cleanup. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- sound/pci/asihpi/hpi_internal.h | 2 +- sound/pci/asihpi/hpios.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h index 4cc315daeda0..8c63200cf339 100644 --- a/sound/pci/asihpi/hpi_internal.h +++ b/sound/pci/asihpi/hpi_internal.h @@ -42,7 +42,7 @@ On error *pLockedMemHandle marked invalid, non-zero returned. If this function succeeds, then HpiOs_LockedMem_GetVirtAddr() and HpiOs_LockedMem_GetPyhsAddr() will always succed on the returned handle. */ -u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle, +int hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle, /**< memory handle */ u32 size, /**< Size in bytes to allocate */ struct pci_dev *p_os_reference diff --git a/sound/pci/asihpi/hpios.c b/sound/pci/asihpi/hpios.c index 2d7d1c2e1d0d..87f4385fe8c7 100644 --- a/sound/pci/asihpi/hpios.c +++ b/sound/pci/asihpi/hpios.c @@ -43,7 +43,7 @@ void hpios_delay_micro_seconds(u32 num_micro_sec) On error, return -ENOMEM, and *pMemArea.size = 0 */ -u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size, +int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size, struct pci_dev *pdev) { /*?? any benefit in using managed dmam_alloc_coherent? */ -- cgit v1.2.3 From ec99aaf47963eaa8615b8508c634be4a178f1c88 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 28 Mar 2012 18:26:13 -0700 Subject: sound: fix oss/msnd_pinnacle module param type Fix module parameter data type to eliminate build warning. sound/oss/msnd_pinnacle.c:1727:1: warning: return from incompatible pointer type Signed-off-by: Randy Dunlap Signed-off-by: Takashi Iwai --- sound/oss/msnd_pinnacle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c index eba734560f6f..2c79d60a725f 100644 --- a/sound/oss/msnd_pinnacle.c +++ b/sound/oss/msnd_pinnacle.c @@ -1631,7 +1631,7 @@ static int ide_irq __initdata = 0; static int joystick_io __initdata = 0; /* If we have the digital daugherboard... */ -static int digital __initdata = 0; +static bool digital __initdata = false; #endif static int fifosize __initdata = DEFFIFOSIZE; -- cgit v1.2.3 From c578ae0026da81a589245ee08e0fd1b1d8a55f4e Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 28 Mar 2012 18:26:17 -0700 Subject: ALSA: fix isa/opti9xx module param type Fix module parameter data type to eliminate build warnings. sound/isa/opti9xx/opti92x-ad1848.c:87:1: warning: return from incompatible pointer type sound/isa/opti9xx/opti92x-ad1848.c:87:1: warning: return from incompatible pointer type Signed-off-by: Randy Dunlap Signed-off-by: Takashi Iwai --- sound/isa/opti9xx/opti92x-ad1848.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index babaedd242f7..d7ccf28bd66a 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -65,7 +65,7 @@ static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ //static bool enable = SNDRV_DEFAULT_ENABLE1; /* Enable this card */ #ifdef CONFIG_PNP -static int isapnp = 1; /* Enable ISA PnP detection */ +static bool isapnp = true; /* Enable ISA PnP detection */ #endif static long port = SNDRV_DEFAULT_PORT1; /* 0x530,0xe80,0xf40,0x604 */ static long mpu_port = SNDRV_DEFAULT_PORT1; /* 0x300,0x310,0x320,0x330 */ -- cgit v1.2.3