aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-10-06 14:16:36 +0200
committerJaroslav Kysela <perex@perex.cz>2010-10-06 14:16:36 +0200
commitd4453cec69a95e3b74d108c45abb2841ce4d8921 (patch)
tree3d0726b3f8ed2e8d21c021219dfe34d1d271679d
parent1317b4a9034c5d8622ae51c06f97f35a62897651 (diff)
parent48e64dd3de170f9216a6a69ad437ed10583cb803 (diff)
downloadalsa-driver-build-unstable-d4453cec69a95e3b74d108c45abb2841ce4d8921.tar.gz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/alsa-driver-build
-rw-r--r--acore/pcm_native.patch75
-rw-r--r--configure.in2
-rw-r--r--include/adriver.h4
-rw-r--r--pci/hda/patch_atihdmi.c3
-rw-r--r--pci/hda/patch_hdmi.c3
-rw-r--r--pci/hda/patch_intelhdmi.c3
-rw-r--r--pci/hda/patch_nvhdmi.c3
-rw-r--r--soc/soc-core.patch16
8 files changed, 69 insertions, 40 deletions
diff --git a/acore/pcm_native.patch b/acore/pcm_native.patch
index 5c0b2a8e6..63d8ccf70 100644
--- a/acore/pcm_native.patch
+++ b/acore/pcm_native.patch
@@ -1,5 +1,5 @@
---- ../alsa-kernel/core/pcm_native.c 2010-08-09 14:25:42.000000000 +0200
-+++ pcm_native.c 2010-08-09 15:01:13.000000000 +0200
+--- ../alsa-kernel/core/pcm_native.c 2010-09-16 23:10:16.996220991 +0200
++++ pcm_native.c 2010-09-17 12:23:15.092424934 +0200
@@ -1,3 +1,5 @@
+#define __NO_VERSION__
+#include "adriver.h"
@@ -17,7 +17,7 @@
#include <linux/time.h>
#include <linux/pm_qos_params.h>
#include <linux/uio.h>
-@@ -369,7 +371,10 @@ static int period_to_usecs(struct snd_pc
+@@ -369,7 +371,10 @@
return usecs;
}
@@ -29,7 +29,7 @@
struct snd_pcm_hw_params *params)
{
struct snd_pcm_runtime *runtime;
-@@ -451,11 +456,29 @@ static int snd_pcm_hw_params(struct snd_
+@@ -451,11 +456,29 @@
snd_pcm_timer_resolution_change(substream);
runtime->status->state = SNDRV_PCM_STATE_SETUP;
@@ -59,7 +59,7 @@
return 0;
_error:
/* hardware might be unuseable from this time,
-@@ -510,7 +533,17 @@ static int snd_pcm_hw_free(struct snd_pc
+@@ -510,7 +533,17 @@
if (substream->ops->hw_free)
result = substream->ops->hw_free(substream);
runtime->status->state = SNDRV_PCM_STATE_OPEN;
@@ -77,7 +77,7 @@
return result;
}
-@@ -1546,7 +1579,11 @@ static struct file *snd_pcm_file_fd(int
+@@ -1552,7 +1585,11 @@
file = fget(fd);
if (!file)
return NULL;
@@ -89,7 +89,28 @@
if (!S_ISCHR(inode->i_mode) ||
imajor(inode) != snd_major) {
fput(file);
-@@ -2803,25 +2840,50 @@ static ssize_t snd_pcm_write(struct file
+@@ -1994,8 +2031,20 @@
+ substream->ops->close(substream);
+ substream->hw_opened = 0;
+ }
++#ifdef CONFIG_SND_HAVE_PM_QOS_REQUEST
++#ifdef CONFIG_SND_HAVE_PM_QOS_REQUEST_STATIC
+ if (pm_qos_request_active(&substream->latency_pm_qos_req))
+ pm_qos_remove_request(&substream->latency_pm_qos_req);
++#else
++ if (substream->latency_pm_qos_req) {
++ pm_qos_remove_request(substream->latency_pm_qos_req);
++ substream->latency_pm_qos_req = NULL;
++ }
++#endif
++#else
++ pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
++ substream->latency_id);
++#endif
+ if (substream->pcm_release) {
+ substream->pcm_release(substream);
+ substream->pcm_release = NULL;
+@@ -2811,25 +2860,50 @@
struct snd_pcm_runtime *runtime;
snd_pcm_sframes_t result;
@@ -147,7 +168,7 @@
{
struct snd_pcm_file *pcm_file;
struct snd_pcm_substream *substream;
-@@ -2831,7 +2893,11 @@ static ssize_t snd_pcm_aio_read(struct k
+@@ -2839,7 +2913,11 @@
void __user **bufs;
snd_pcm_uframes_t frames;
@@ -159,7 +180,7 @@
substream = pcm_file->substream;
if (PCM_RUNTIME_CHECK(substream))
return -ENXIO;
-@@ -2855,8 +2921,13 @@ static ssize_t snd_pcm_aio_read(struct k
+@@ -2863,8 +2941,13 @@
return result;
}
@@ -173,7 +194,7 @@
{
struct snd_pcm_file *pcm_file;
struct snd_pcm_substream *substream;
-@@ -2866,7 +2937,11 @@ static ssize_t snd_pcm_aio_write(struct
+@@ -2874,7 +2957,11 @@
void __user **bufs;
snd_pcm_uframes_t frames;
@@ -185,7 +206,7 @@
substream = pcm_file->substream;
if (PCM_RUNTIME_CHECK(substream))
return -ENXIO;
-@@ -2888,6 +2963,7 @@ static ssize_t snd_pcm_aio_write(struct
+@@ -2896,6 +2983,7 @@
kfree(bufs);
return result;
}
@@ -193,7 +214,7 @@
static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
{
-@@ -2975,6 +3051,22 @@ static unsigned int snd_pcm_capture_poll
+@@ -2983,6 +3071,22 @@
* mmap support
*/
@@ -216,7 +237,7 @@
/*
* Only on coherent architectures, we can mmap the status and the control records
* for effcient data transfer. On others, we have to use HWSYNC ioctl...
-@@ -2983,6 +3075,7 @@ static unsigned int snd_pcm_capture_poll
+@@ -2991,6 +3095,7 @@
/*
* mmap status record
*/
@@ -224,7 +245,7 @@
static int snd_pcm_mmap_status_fault(struct vm_area_struct *area,
struct vm_fault *vmf)
{
-@@ -2996,10 +3089,49 @@ static int snd_pcm_mmap_status_fault(str
+@@ -3004,10 +3109,49 @@
get_page(vmf->page);
return 0;
}
@@ -274,7 +295,7 @@
};
static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file,
-@@ -3014,7 +3146,11 @@ static int snd_pcm_mmap_status(struct sn
+@@ -3022,7 +3166,11 @@
if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status)))
return -EINVAL;
area->vm_ops = &snd_pcm_vm_ops_status;
@@ -286,7 +307,7 @@
area->vm_flags |= VM_RESERVED;
return 0;
}
-@@ -3022,6 +3158,7 @@ static int snd_pcm_mmap_status(struct sn
+@@ -3030,6 +3178,7 @@
/*
* mmap control record
*/
@@ -294,7 +315,7 @@
static int snd_pcm_mmap_control_fault(struct vm_area_struct *area,
struct vm_fault *vmf)
{
-@@ -3035,10 +3172,50 @@ static int snd_pcm_mmap_control_fault(st
+@@ -3043,10 +3192,50 @@
get_page(vmf->page);
return 0;
}
@@ -345,7 +366,7 @@
};
static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file,
-@@ -3053,7 +3230,11 @@ static int snd_pcm_mmap_control(struct s
+@@ -3061,7 +3250,11 @@
if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control)))
return -EINVAL;
area->vm_ops = &snd_pcm_vm_ops_control;
@@ -357,7 +378,7 @@
area->vm_flags |= VM_RESERVED;
return 0;
}
-@@ -3094,9 +3275,16 @@ snd_pcm_default_page_ops(struct snd_pcm_
+@@ -3102,9 +3295,16 @@
return virt_to_page(vaddr);
}
@@ -374,7 +395,7 @@
static int snd_pcm_mmap_data_fault(struct vm_area_struct *area,
struct vm_fault *vmf)
{
-@@ -3123,6 +3311,59 @@ static int snd_pcm_mmap_data_fault(struc
+@@ -3131,6 +3331,59 @@
vmf->page = page;
return 0;
}
@@ -434,7 +455,7 @@
static const struct vm_operations_struct snd_pcm_vm_ops_data = {
.open = snd_pcm_mmap_data_open,
-@@ -3132,7 +3373,14 @@ static const struct vm_operations_struct
+@@ -3140,7 +3393,14 @@
static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = {
.open = snd_pcm_mmap_data_open,
.close = snd_pcm_mmap_data_close,
@@ -449,7 +470,7 @@
};
#ifndef ARCH_HAS_DMA_MMAP_COHERENT
-@@ -3180,11 +3428,26 @@ int snd_pcm_lib_mmap_iomem(struct snd_pc
+@@ -3188,11 +3448,26 @@
area->vm_page_prot = pgprot_noncached(area->vm_page_prot);
area->vm_flags |= VM_IO;
size = area->vm_end - area->vm_start;
@@ -477,7 +498,7 @@
return 0;
}
-@@ -3228,7 +3491,7 @@ int snd_pcm_mmap_data(struct snd_pcm_sub
+@@ -3236,7 +3511,7 @@
runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED)
return -EINVAL;
size = area->vm_end - area->vm_start;
@@ -486,7 +507,7 @@
dma_bytes = PAGE_ALIGN(runtime->dma_bytes);
if ((size_t)size > dma_bytes)
return -EINVAL;
-@@ -3236,7 +3499,11 @@ int snd_pcm_mmap_data(struct snd_pcm_sub
+@@ -3244,7 +3519,11 @@
return -EINVAL;
area->vm_ops = &snd_pcm_vm_ops_data;
@@ -498,7 +519,7 @@
if (substream->ops->mmap)
err = substream->ops->mmap(substream, area);
else
-@@ -3259,7 +3526,7 @@ static int snd_pcm_mmap(struct file *fil
+@@ -3267,7 +3546,7 @@
if (PCM_RUNTIME_CHECK(substream))
return -ENXIO;
@@ -507,7 +528,7 @@
switch (offset) {
case SNDRV_PCM_MMAP_OFFSET_STATUS:
if (pcm_file->no_compat_mmap)
-@@ -3292,12 +3559,34 @@ static int snd_pcm_fasync(int fd, struct
+@@ -3300,12 +3579,34 @@
/*
* ioctl32 compat
*/
@@ -543,7 +564,7 @@
/*
* To be removed helpers to keep binary compatibility
*/
-@@ -3436,31 +3725,55 @@ static unsigned long snd_pcm_get_unmappe
+@@ -3444,31 +3745,55 @@
const struct file_operations snd_pcm_f_ops[2] = {
{
diff --git a/configure.in b/configure.in
index c8fefefee..82ef3c05a 100644
--- a/configure.in
+++ b/configure.in
@@ -461,7 +461,7 @@ AC_DEFUN([CHECK_KERNEL_HEADER], [
AC_MSG_RESULT(no)
if test ! -f include/$1; then
mkdir -p include/linux include/asm include/media
- mkdir -p include/linux/regulator include/linux/usb
+ mkdir -p include/linux/regulator include/linux/usb include/pcmcia
if test -z "$2" ; then
echo "Creating a dummy <$1>..."
touch include/$1
diff --git a/include/adriver.h b/include/adriver.h
index 1c7e87b11..495e6404f 100644
--- a/include/adriver.h
+++ b/include/adriver.h
@@ -1566,6 +1566,10 @@ XXX_DEFINE_STRTO(ull, unsigned long long);
#define pr_warning(fmt, arg...) \
printk(KERN_WARNING fmt, ##arg)
#endif
+#ifndef pr_warn
+#define pr_warn(fmt, arg...) \
+ printk(KERN_WARNING fmt, ##arg)
+#endif
#ifndef pr_notice
#define pr_notice(fmt, arg...) \
printk(KERN_NOTICE fmt, ##arg)
diff --git a/pci/hda/patch_atihdmi.c b/pci/hda/patch_atihdmi.c
deleted file mode 100644
index 5628a1b7d..000000000
--- a/pci/hda/patch_atihdmi.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define __NO_VERSION__
-#include "adriver.h"
-#include "../../alsa-kernel/pci/hda/patch_atihdmi.c"
diff --git a/pci/hda/patch_hdmi.c b/pci/hda/patch_hdmi.c
new file mode 100644
index 000000000..68d42a7b0
--- /dev/null
+++ b/pci/hda/patch_hdmi.c
@@ -0,0 +1,3 @@
+#define __NO_VERSION__
+#include "adriver.h"
+#include "../../alsa-kernel/pci/hda/patch_hdmi.c"
diff --git a/pci/hda/patch_intelhdmi.c b/pci/hda/patch_intelhdmi.c
deleted file mode 100644
index 027e57a78..000000000
--- a/pci/hda/patch_intelhdmi.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define __NO_VERSION__
-#include "adriver.h"
-#include "../../alsa-kernel/pci/hda/patch_intelhdmi.c"
diff --git a/pci/hda/patch_nvhdmi.c b/pci/hda/patch_nvhdmi.c
deleted file mode 100644
index 3e700fdb7..000000000
--- a/pci/hda/patch_nvhdmi.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define __NO_VERSION__
-#include "adriver.h"
-#include "../../alsa-kernel/pci/hda/patch_nvhdmi.c"
diff --git a/soc/soc-core.patch b/soc/soc-core.patch
index fd608116f..988e1d097 100644
--- a/soc/soc-core.patch
+++ b/soc/soc-core.patch
@@ -1,5 +1,5 @@
---- ../alsa-kernel/soc/soc-core.c 2009-12-18 14:00:11.000000000 +0100
-+++ soc-core.c 2009-12-18 14:08:12.000000000 +0100
+--- ../alsa-kernel/soc/soc-core.c 2010-09-30 23:00:05.764410616 +0200
++++ soc-core.c 2010-10-04 09:16:06.920758499 +0200
@@ -1,3 +1,8 @@
+#include "adriver.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
@@ -9,7 +9,17 @@
/*
* soc-core.c -- ALSA SoC Audio Layer
*
-@@ -1236,21 +1241,43 @@
+@@ -1452,7 +1457,9 @@
+
+ /* register the rtd device */
+ rtd->dev.release = rtd_release;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+ rtd->dev.init_name = dai_link->name;
++#endif
+ ret = device_register(&rtd->dev);
+ if (ret < 0) {
+ printk(KERN_ERR "asoc: failed to register DAI runtime device %d\n", ret);
+@@ -1693,21 +1700,43 @@
return 0;
}