From: Greg Kroah-Hartman Date: Fri, 9 Dec 2011 19:58:18 +0000 (-0800) Subject: 3.0 patches X-Git-Tag: v3.0.14~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c013b8cfb1e0bfc74a27407ccd4e07993746c88;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0 patches added patches: alarmtimers-fix-time-comparison.patch alsa-hda-realtek-fix-oops-in-alc_mux_select.patch alsa-sis7019-give-slow-codecs-more-time-to-reset.patch arm-at91-fix-clock-conid-for-atmel_tcb.1-on-9260-9g20.patch arm-davinci-da850-evm-change-audio-edma-event-queue-to-eventq_0.patch arm-davinci-dm646x-evm-wrong-register-used-in-setup_vpif_input_channel_mode.patch arm-mx23-recognise-stmp378x-as-mx23.patch asoc-provide-a-more-complete-dma-driver-stub.patch --- diff --git a/queue-3.0/alarmtimers-fix-time-comparison.patch b/queue-3.0/alarmtimers-fix-time-comparison.patch new file mode 100644 index 00000000000..ed42670bb7e --- /dev/null +++ b/queue-3.0/alarmtimers-fix-time-comparison.patch @@ -0,0 +1,34 @@ +From c9c024b3f3e07d087974db4c0dc46217fff3a6c0 Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Mon, 5 Dec 2011 21:20:23 +0100 +Subject: alarmtimers: Fix time comparison + +From: Thomas Gleixner + +commit c9c024b3f3e07d087974db4c0dc46217fff3a6c0 upstream. + +The expiry function compares the timer against current time and does +not expire the timer when the expiry time is >= now. That's wrong. If +the timer is set for now, then it must expire. + +Make the condition expiry > now for breaking out the loop. + +Signed-off-by: Thomas Gleixner +Acked-by: John Stultz +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/time/alarmtimer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/time/alarmtimer.c ++++ b/kernel/time/alarmtimer.c +@@ -181,7 +181,7 @@ static enum hrtimer_restart alarmtimer_f + struct alarm *alarm; + ktime_t expired = next->expires; + +- if (expired.tv64 >= now.tv64) ++ if (expired.tv64 > now.tv64) + break; + + alarm = container_of(next, struct alarm, node); diff --git a/queue-3.0/alsa-hda-realtek-fix-oops-in-alc_mux_select.patch b/queue-3.0/alsa-hda-realtek-fix-oops-in-alc_mux_select.patch new file mode 100644 index 00000000000..661d2368c5c --- /dev/null +++ b/queue-3.0/alsa-hda-realtek-fix-oops-in-alc_mux_select.patch @@ -0,0 +1,31 @@ +From cce4aa378a049f4275416ee6302dd24f37b289df Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 2 Dec 2011 15:29:12 +0100 +Subject: ALSA: hda/realtek - Fix Oops in alc_mux_select() + +From: Takashi Iwai + +commit cce4aa378a049f4275416ee6302dd24f37b289df upstream. + +When no imux is available (e.g. a single capture source), +alc_auto_init_input_src() may trigger an Oops due to the access to -1. +Add a proper zero-check to avoid it. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -509,6 +509,8 @@ static int alc_mux_enum_put(struct snd_k + imux = &spec->input_mux[mux_idx]; + if (!imux->num_items && mux_idx > 0) + imux = &spec->input_mux[0]; ++ if (!imux->num_items) ++ return 0; + + type = get_wcaps_type(get_wcaps(codec, nid)); + if (type == AC_WID_AUD_MIX) { diff --git a/queue-3.0/alsa-sis7019-give-slow-codecs-more-time-to-reset.patch b/queue-3.0/alsa-sis7019-give-slow-codecs-more-time-to-reset.patch new file mode 100644 index 00000000000..53d886c0b85 --- /dev/null +++ b/queue-3.0/alsa-sis7019-give-slow-codecs-more-time-to-reset.patch @@ -0,0 +1,140 @@ +From fc084e0b930d546872ab23667052499f7daf0fed Mon Sep 17 00:00:00 2001 +From: David Dillow +Date: Thu, 1 Dec 2011 23:26:53 -0500 +Subject: ALSA: sis7019 - give slow codecs more time to reset + +From: David Dillow + +commit fc084e0b930d546872ab23667052499f7daf0fed upstream. + +There are some AC97 codec and board combinations that have been observed +to take a very long time to respond after the cold reset has completed. +In one case, more than 350 ms was required. To allow users to have sound +on those platforms, we'll wait up to 500ms for the codec to become +ready. + +As a board may have multiple codecs, with some faster than others to +reset, we add a module parameter to inform the driver which codecs +should be present. + +Reported-by: KotCzarny +Signed-off-by: David Dillow +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/sis7019.c | 64 +++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 53 insertions(+), 11 deletions(-) + +--- a/sound/pci/sis7019.c ++++ b/sound/pci/sis7019.c +@@ -41,6 +41,7 @@ MODULE_SUPPORTED_DEVICE("{{SiS,SiS7019 A + static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ + static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ + static int enable = 1; ++static int codecs = 1; + + module_param(index, int, 0444); + MODULE_PARM_DESC(index, "Index value for SiS7019 Audio Accelerator."); +@@ -48,6 +49,8 @@ module_param(id, charp, 0444); + MODULE_PARM_DESC(id, "ID string for SiS7019 Audio Accelerator."); + module_param(enable, bool, 0444); + MODULE_PARM_DESC(enable, "Enable SiS7019 Audio Accelerator."); ++module_param(codecs, int, 0444); ++MODULE_PARM_DESC(codecs, "Set bit to indicate that codec number is expected to be present (default 1)"); + + static DEFINE_PCI_DEVICE_TABLE(snd_sis7019_ids) = { + { PCI_DEVICE(PCI_VENDOR_ID_SI, 0x7019) }, +@@ -140,6 +143,9 @@ struct sis7019 { + dma_addr_t silence_dma_addr; + }; + ++/* These values are also used by the module param 'codecs' to indicate ++ * which codecs should be present. ++ */ + #define SIS_PRIMARY_CODEC_PRESENT 0x0001 + #define SIS_SECONDARY_CODEC_PRESENT 0x0002 + #define SIS_TERTIARY_CODEC_PRESENT 0x0004 +@@ -1078,6 +1084,7 @@ static int sis_chip_init(struct sis7019 + { + unsigned long io = sis->ioport; + void __iomem *ioaddr = sis->ioaddr; ++ unsigned long timeout; + u16 status; + int count; + int i; +@@ -1104,21 +1111,45 @@ static int sis_chip_init(struct sis7019 + while ((inw(io + SIS_AC97_STATUS) & SIS_AC97_STATUS_BUSY) && --count) + udelay(1); + +- /* Now that we've finished the reset, find out what's attached. ++ /* Command complete, we can let go of the semaphore now. + */ +- status = inl(io + SIS_AC97_STATUS); +- if (status & SIS_AC97_STATUS_CODEC_READY) +- sis->codecs_present |= SIS_PRIMARY_CODEC_PRESENT; +- if (status & SIS_AC97_STATUS_CODEC2_READY) +- sis->codecs_present |= SIS_SECONDARY_CODEC_PRESENT; +- if (status & SIS_AC97_STATUS_CODEC3_READY) +- sis->codecs_present |= SIS_TERTIARY_CODEC_PRESENT; ++ outl(SIS_AC97_SEMA_RELEASE, io + SIS_AC97_SEMA); ++ if (!count) ++ return -EIO; ++ ++ /* Now that we've finished the reset, find out what's attached. ++ * There are some codec/board combinations that take an extremely ++ * long time to come up. 350+ ms has been observed in the field, ++ * so we'll give them up to 500ms. ++ */ ++ sis->codecs_present = 0; ++ timeout = msecs_to_jiffies(500) + jiffies; ++ while (time_before_eq(jiffies, timeout)) { ++ status = inl(io + SIS_AC97_STATUS); ++ if (status & SIS_AC97_STATUS_CODEC_READY) ++ sis->codecs_present |= SIS_PRIMARY_CODEC_PRESENT; ++ if (status & SIS_AC97_STATUS_CODEC2_READY) ++ sis->codecs_present |= SIS_SECONDARY_CODEC_PRESENT; ++ if (status & SIS_AC97_STATUS_CODEC3_READY) ++ sis->codecs_present |= SIS_TERTIARY_CODEC_PRESENT; ++ ++ if (sis->codecs_present == codecs) ++ break; + +- /* All done, let go of the semaphore, and check for errors ++ msleep(1); ++ } ++ ++ /* All done, check for errors. + */ +- outl(SIS_AC97_SEMA_RELEASE, io + SIS_AC97_SEMA); +- if (!sis->codecs_present || !count) ++ if (!sis->codecs_present) { ++ printk(KERN_ERR "sis7019: could not find any codecs\n"); + return -EIO; ++ } ++ ++ if (sis->codecs_present != codecs) { ++ printk(KERN_WARNING "sis7019: missing codecs, found %0x, expected %0x\n", ++ sis->codecs_present, codecs); ++ } + + /* Let the hardware know that the audio driver is alive, + * and enable PCM slots on the AC-link for L/R playback (3 & 4) and +@@ -1390,6 +1421,17 @@ static int __devinit snd_sis7019_probe(s + if (!enable) + goto error_out; + ++ /* The user can specify which codecs should be present so that we ++ * can wait for them to show up if they are slow to recover from ++ * the AC97 cold reset. We default to a single codec, the primary. ++ * ++ * We assume that SIS_PRIMARY_*_PRESENT matches bits 0-2. ++ */ ++ codecs &= SIS_PRIMARY_CODEC_PRESENT | SIS_SECONDARY_CODEC_PRESENT | ++ SIS_TERTIARY_CODEC_PRESENT; ++ if (!codecs) ++ codecs = SIS_PRIMARY_CODEC_PRESENT; ++ + rc = snd_card_create(index, id, THIS_MODULE, sizeof(*sis), &card); + if (rc < 0) + goto error_out; diff --git a/queue-3.0/arm-at91-fix-clock-conid-for-atmel_tcb.1-on-9260-9g20.patch b/queue-3.0/arm-at91-fix-clock-conid-for-atmel_tcb.1-on-9260-9g20.patch new file mode 100644 index 00000000000..433780ac3a9 --- /dev/null +++ b/queue-3.0/arm-at91-fix-clock-conid-for-atmel_tcb.1-on-9260-9g20.patch @@ -0,0 +1,34 @@ +From 1808958d27b1250295f01dff4997d8a8814adaab Mon Sep 17 00:00:00 2001 +From: Jean-Christophe PLAGNIOL-VILLARD +Date: Mon, 28 Nov 2011 12:53:08 +0100 +Subject: ARM: at91: fix clock conid for atmel_tcb.1 on 9260/9g20 + +From: Jean-Christophe PLAGNIOL-VILLARD + +commit 1808958d27b1250295f01dff4997d8a8814adaab upstream. + +The conid is supposed to be t0/t1/t2_clk. + +Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +Acked-by: Nicolas Ferre +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-at91/at91sam9260.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm/mach-at91/at91sam9260.c ++++ b/arch/arm/mach-at91/at91sam9260.c +@@ -237,9 +237,9 @@ static struct clk_lookup periph_clocks_l + CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), + CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), + CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), +- CLKDEV_CON_DEV_ID("t3_clk", "atmel_tcb.1", &tc3_clk), +- CLKDEV_CON_DEV_ID("t4_clk", "atmel_tcb.1", &tc4_clk), +- CLKDEV_CON_DEV_ID("t5_clk", "atmel_tcb.1", &tc5_clk), ++ CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tc3_clk), ++ CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.1", &tc4_clk), ++ CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.1", &tc5_clk), + CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk), + }; + diff --git a/queue-3.0/arm-davinci-da850-evm-change-audio-edma-event-queue-to-eventq_0.patch b/queue-3.0/arm-davinci-da850-evm-change-audio-edma-event-queue-to-eventq_0.patch new file mode 100644 index 00000000000..fba62089c1a --- /dev/null +++ b/queue-3.0/arm-davinci-da850-evm-change-audio-edma-event-queue-to-eventq_0.patch @@ -0,0 +1,38 @@ +From f1b21c525693b0159aed83b5871f2d0f077f208e Mon Sep 17 00:00:00 2001 +From: "Manjunathappa, Prakash" +Date: Thu, 10 Nov 2011 11:43:21 +0530 +Subject: ARM: davinci: da850 evm: change audio edma event queue to EVENTQ_0 + +From: "Manjunathappa, Prakash" + +commit f1b21c525693b0159aed83b5871f2d0f077f208e upstream. + +On OMAP-L138 platform, EDMA event queue 0 should be used for audio +transfers so that they are not starved by video data moving on event queue 1. + +Commit 48519f0ae03bc7e86b3dc93e56f1334d53803770 (ASoC: davinci: let platform +data define edma queue numbers) had a side-effect of changing this behavior +by making the driver actually honor the platform data passed. + +Fix this now by passing event queue 0 as the queue to be used for audio +transfers. + +Signed-off-by: Manjunathappa, Prakash +Signed-off-by: Sekhar Nori +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-davinci/board-da850-evm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/mach-davinci/board-da850-evm.c ++++ b/arch/arm/mach-davinci/board-da850-evm.c +@@ -748,7 +748,7 @@ static struct snd_platform_data da850_ev + .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction), + .tdm_slots = 2, + .serial_dir = da850_iis_serializer_direction, +- .asp_chan_q = EVENTQ_1, ++ .asp_chan_q = EVENTQ_0, + .version = MCASP_VERSION_2, + .txnumevt = 1, + .rxnumevt = 1, diff --git a/queue-3.0/arm-davinci-dm646x-evm-wrong-register-used-in-setup_vpif_input_channel_mode.patch b/queue-3.0/arm-davinci-dm646x-evm-wrong-register-used-in-setup_vpif_input_channel_mode.patch new file mode 100644 index 00000000000..c04519dda84 --- /dev/null +++ b/queue-3.0/arm-davinci-dm646x-evm-wrong-register-used-in-setup_vpif_input_channel_mode.patch @@ -0,0 +1,53 @@ +From 83713fc9373be2e943f82e9d36213708c6b0050e Mon Sep 17 00:00:00 2001 +From: Hans Verkuil +Date: Mon, 14 Nov 2011 19:20:49 +0100 +Subject: ARM: davinci: dm646x evm: wrong register used in setup_vpif_input_channel_mode + +From: Hans Verkuil + +commit 83713fc9373be2e943f82e9d36213708c6b0050e upstream. + +The function setup_vpif_input_channel_mode() used the VSCLKDIS register +instead of VIDCLKCTL. This meant that when in HD mode videoport channel 0 +used a different clock from channel 1. + +Clearly a copy-and-paste error. + +Signed-off-by: Hans Verkuil +Acked-by: Manjunath Hadli +Signed-off-by: Sekhar Nori +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-davinci/board-dm646x-evm.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm/mach-davinci/board-dm646x-evm.c ++++ b/arch/arm/mach-davinci/board-dm646x-evm.c +@@ -563,7 +563,7 @@ static int setup_vpif_input_channel_mode + int val; + u32 value; + +- if (!vpif_vsclkdis_reg || !cpld_client) ++ if (!vpif_vidclkctl_reg || !cpld_client) + return -ENXIO; + + val = i2c_smbus_read_byte(cpld_client); +@@ -571,7 +571,7 @@ static int setup_vpif_input_channel_mode + return val; + + spin_lock_irqsave(&vpif_reg_lock, flags); +- value = __raw_readl(vpif_vsclkdis_reg); ++ value = __raw_readl(vpif_vidclkctl_reg); + if (mux_mode) { + val &= VPIF_INPUT_TWO_CHANNEL; + value |= VIDCH1CLK; +@@ -579,7 +579,7 @@ static int setup_vpif_input_channel_mode + val |= VPIF_INPUT_ONE_CHANNEL; + value &= ~VIDCH1CLK; + } +- __raw_writel(value, vpif_vsclkdis_reg); ++ __raw_writel(value, vpif_vidclkctl_reg); + spin_unlock_irqrestore(&vpif_reg_lock, flags); + + err = i2c_smbus_write_byte(cpld_client, val); diff --git a/queue-3.0/arm-mx23-recognise-stmp378x-as-mx23.patch b/queue-3.0/arm-mx23-recognise-stmp378x-as-mx23.patch new file mode 100644 index 00000000000..1b27178c35a --- /dev/null +++ b/queue-3.0/arm-mx23-recognise-stmp378x-as-mx23.patch @@ -0,0 +1,30 @@ +From 11357be9246c7d1acf9b37ad54a18b29bbb734be Mon Sep 17 00:00:00 2001 +From: Wolfram Sang +Date: Sat, 26 Nov 2011 11:39:14 +0100 +Subject: arm: mx23: recognise stmp378x as mx23 + +From: Wolfram Sang + +commit 11357be9246c7d1acf9b37ad54a18b29bbb734be upstream. + +Adding the machine_is_* line was forgotten when converting mach-stmp378x to +mach-mxs. + +Signed-off-by: Wolfram Sang +Signed-off-by: Shawn Guo +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-mxs/include/mach/mxs.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/mach-mxs/include/mach/mxs.h ++++ b/arch/arm/mach-mxs/include/mach/mxs.h +@@ -30,6 +30,7 @@ + */ + #define cpu_is_mx23() ( \ + machine_is_mx23evk() || \ ++ machine_is_stmp378x() || \ + 0) + #define cpu_is_mx28() ( \ + machine_is_mx28evk() || \ diff --git a/queue-3.0/asoc-provide-a-more-complete-dma-driver-stub.patch b/queue-3.0/asoc-provide-a-more-complete-dma-driver-stub.patch new file mode 100644 index 00000000000..87fd25099c8 --- /dev/null +++ b/queue-3.0/asoc-provide-a-more-complete-dma-driver-stub.patch @@ -0,0 +1,67 @@ +From cefcc03ffc9527dde56807339edb1719c8dbae5f Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Mon, 5 Dec 2011 20:50:45 +0000 +Subject: ASoC: Provide a more complete DMA driver stub + +From: Mark Brown + +commit cefcc03ffc9527dde56807339edb1719c8dbae5f upstream. + +Allow userspace applications to do more parameter setting by providing a +more complete stub DMA driver specifying a wildcard set of formats and +channels and essentially random values for the DMA parameters. This is +required for useful runtime operation of the dummy DMA driver until we +are able to figure out how to power up links and do hw_params() from DAPM. + +Sending to stable as without this the dummy driver is not terribly +useful. + +Reported-by: Kyung-Kwee Ryu +Tested-by: Kyung-Kwee Ryu +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-utils.c | 31 ++++++++++++++++++++++++++++++- + 1 file changed, 30 insertions(+), 1 deletion(-) + +--- a/sound/soc/soc-utils.c ++++ b/sound/soc/soc-utils.c +@@ -57,7 +57,36 @@ int snd_soc_params_to_bclk(struct snd_pc + } + EXPORT_SYMBOL_GPL(snd_soc_params_to_bclk); + +-static struct snd_soc_platform_driver dummy_platform; ++static const struct snd_pcm_hardware dummy_dma_hardware = { ++ .formats = 0xffffffff, ++ .channels_min = 1, ++ .channels_max = UINT_MAX, ++ ++ /* Random values to keep userspace happy when checking constraints */ ++ .info = SNDRV_PCM_INFO_INTERLEAVED | ++ SNDRV_PCM_INFO_BLOCK_TRANSFER, ++ .buffer_bytes_max = 128*1024, ++ .period_bytes_min = PAGE_SIZE, ++ .period_bytes_max = PAGE_SIZE*2, ++ .periods_min = 2, ++ .periods_max = 128, ++}; ++ ++static int dummy_dma_open(struct snd_pcm_substream *substream) ++{ ++ snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware); ++ ++ return 0; ++} ++ ++static struct snd_pcm_ops dummy_dma_ops = { ++ .open = dummy_dma_open, ++ .ioctl = snd_pcm_lib_ioctl, ++}; ++ ++static struct snd_soc_platform_driver dummy_platform = { ++ .ops = &dummy_dma_ops, ++}; + + static __devinit int snd_soc_dummy_probe(struct platform_device *pdev) + { diff --git a/queue-3.0/series b/queue-3.0/series new file mode 100644 index 00000000000..94e6a222ee4 --- /dev/null +++ b/queue-3.0/series @@ -0,0 +1,8 @@ +alsa-sis7019-give-slow-codecs-more-time-to-reset.patch +alsa-hda-realtek-fix-oops-in-alc_mux_select.patch +alarmtimers-fix-time-comparison.patch +arm-davinci-da850-evm-change-audio-edma-event-queue-to-eventq_0.patch +arm-mx23-recognise-stmp378x-as-mx23.patch +arm-at91-fix-clock-conid-for-atmel_tcb.1-on-9260-9g20.patch +arm-davinci-dm646x-evm-wrong-register-used-in-setup_vpif_input_channel_mode.patch +asoc-provide-a-more-complete-dma-driver-stub.patch