diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-24 17:09:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-24 17:09:35 -0500 |
commit | 5bdc22a56549e7983c6b443298672641952ea035 (patch) | |
tree | fbfd4e7453e4fd23dfef826d4610ed2aae47b36c /Documentation | |
parent | b6f4098897f30b7ea90a1c1edf35e9b20a9d828a (diff) | |
parent | e92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_tbf.c
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DocBook/device-drivers.tmpl | 4 | ||||
-rw-r--r-- | Documentation/DocBook/dvb/dvbapi.xml | 2 | ||||
-rw-r--r-- | Documentation/DocBook/media.tmpl | 4 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/dev-rds.xml | 6 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/v4l2.xml | 3 | ||||
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 8 | ||||
-rw-r--r-- | Documentation/lguest/lguest.c | 73 | ||||
-rw-r--r-- | Documentation/lguest/lguest.txt | 5 | ||||
-rw-r--r-- | Documentation/sound/alsa/soc/codec.txt | 45 | ||||
-rw-r--r-- | Documentation/sound/alsa/soc/machine.txt | 38 | ||||
-rw-r--r-- | Documentation/sound/alsa/soc/platform.txt | 12 | ||||
-rw-r--r-- | Documentation/video4linux/v4l2-controls.txt | 12 |
12 files changed, 133 insertions, 79 deletions
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 35447e081736..36f63d4a0a06 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -217,8 +217,8 @@ X!Isound/sound_firmware.c | |||
217 | <chapter id="uart16x50"> | 217 | <chapter id="uart16x50"> |
218 | <title>16x50 UART Driver</title> | 218 | <title>16x50 UART Driver</title> |
219 | !Iinclude/linux/serial_core.h | 219 | !Iinclude/linux/serial_core.h |
220 | !Edrivers/serial/serial_core.c | 220 | !Edrivers/tty/serial/serial_core.c |
221 | !Edrivers/serial/8250.c | 221 | !Edrivers/tty/serial/8250.c |
222 | </chapter> | 222 | </chapter> |
223 | 223 | ||
224 | <chapter id="fbdev"> | 224 | <chapter id="fbdev"> |
diff --git a/Documentation/DocBook/dvb/dvbapi.xml b/Documentation/DocBook/dvb/dvbapi.xml index e3a97fdd62a6..ad8678d48916 100644 --- a/Documentation/DocBook/dvb/dvbapi.xml +++ b/Documentation/DocBook/dvb/dvbapi.xml | |||
@@ -28,7 +28,7 @@ | |||
28 | <holder>Convergence GmbH</holder> | 28 | <holder>Convergence GmbH</holder> |
29 | </copyright> | 29 | </copyright> |
30 | <copyright> | 30 | <copyright> |
31 | <year>2009-2010</year> | 31 | <year>2009-2011</year> |
32 | <holder>Mauro Carvalho Chehab</holder> | 32 | <holder>Mauro Carvalho Chehab</holder> |
33 | </copyright> | 33 | </copyright> |
34 | 34 | ||
diff --git a/Documentation/DocBook/media.tmpl b/Documentation/DocBook/media.tmpl index f11048d4053f..a99088aae1aa 100644 --- a/Documentation/DocBook/media.tmpl +++ b/Documentation/DocBook/media.tmpl | |||
@@ -28,7 +28,7 @@ | |||
28 | <title>LINUX MEDIA INFRASTRUCTURE API</title> | 28 | <title>LINUX MEDIA INFRASTRUCTURE API</title> |
29 | 29 | ||
30 | <copyright> | 30 | <copyright> |
31 | <year>2009-2010</year> | 31 | <year>2009-2011</year> |
32 | <holder>LinuxTV Developers</holder> | 32 | <holder>LinuxTV Developers</holder> |
33 | </copyright> | 33 | </copyright> |
34 | 34 | ||
@@ -86,7 +86,7 @@ Foundation. A copy of the license is included in the chapter entitled | |||
86 | </author> | 86 | </author> |
87 | </authorgroup> | 87 | </authorgroup> |
88 | <copyright> | 88 | <copyright> |
89 | <year>2009-2010</year> | 89 | <year>2009-2011</year> |
90 | <holder>Mauro Carvalho Chehab</holder> | 90 | <holder>Mauro Carvalho Chehab</holder> |
91 | </copyright> | 91 | </copyright> |
92 | 92 | ||
diff --git a/Documentation/DocBook/v4l/dev-rds.xml b/Documentation/DocBook/v4l/dev-rds.xml index 360d2737e649..2427f54397e7 100644 --- a/Documentation/DocBook/v4l/dev-rds.xml +++ b/Documentation/DocBook/v4l/dev-rds.xml | |||
@@ -75,6 +75,7 @@ as follows:</para> | |||
75 | </section> | 75 | </section> |
76 | 76 | ||
77 | <section> | 77 | <section> |
78 | <title>RDS datastructures</title> | ||
78 | <table frame="none" pgwide="1" id="v4l2-rds-data"> | 79 | <table frame="none" pgwide="1" id="v4l2-rds-data"> |
79 | <title>struct | 80 | <title>struct |
80 | <structname>v4l2_rds_data</structname></title> | 81 | <structname>v4l2_rds_data</structname></title> |
@@ -129,10 +130,11 @@ as follows:</para> | |||
129 | 130 | ||
130 | <table frame="none" pgwide="1" id="v4l2-rds-block-codes"> | 131 | <table frame="none" pgwide="1" id="v4l2-rds-block-codes"> |
131 | <title>Block defines</title> | 132 | <title>Block defines</title> |
132 | <tgroup cols="3"> | 133 | <tgroup cols="4"> |
133 | <colspec colname="c1" colwidth="1*" /> | 134 | <colspec colname="c1" colwidth="1*" /> |
134 | <colspec colname="c2" colwidth="1*" /> | 135 | <colspec colname="c2" colwidth="1*" /> |
135 | <colspec colname="c3" colwidth="5*" /> | 136 | <colspec colname="c3" colwidth="1*" /> |
137 | <colspec colname="c4" colwidth="5*" /> | ||
136 | <tbody valign="top"> | 138 | <tbody valign="top"> |
137 | <row> | 139 | <row> |
138 | <entry>V4L2_RDS_BLOCK_MSK</entry> | 140 | <entry>V4L2_RDS_BLOCK_MSK</entry> |
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml index 839e93e875ae..9288af96de34 100644 --- a/Documentation/DocBook/v4l/v4l2.xml +++ b/Documentation/DocBook/v4l/v4l2.xml | |||
@@ -100,6 +100,7 @@ Remote Controller chapter.</contrib> | |||
100 | <year>2008</year> | 100 | <year>2008</year> |
101 | <year>2009</year> | 101 | <year>2009</year> |
102 | <year>2010</year> | 102 | <year>2010</year> |
103 | <year>2011</year> | ||
103 | <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin | 104 | <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin |
104 | Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> | 105 | Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> |
105 | </copyright> | 106 | </copyright> |
@@ -381,7 +382,7 @@ and discussions on the V4L mailing list.</revremark> | |||
381 | </partinfo> | 382 | </partinfo> |
382 | 383 | ||
383 | <title>Video for Linux Two API Specification</title> | 384 | <title>Video for Linux Two API Specification</title> |
384 | <subtitle>Revision 2.6.33</subtitle> | 385 | <subtitle>Revision 2.6.38</subtitle> |
385 | 386 | ||
386 | <chapter id="common"> | 387 | <chapter id="common"> |
387 | &sub-common; | 388 | &sub-common; |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 05b248aa91f1..ccb6048415b2 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -357,14 +357,6 @@ Who: Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com> | |||
357 | 357 | ||
358 | ----------------------------- | 358 | ----------------------------- |
359 | 359 | ||
360 | What: __do_IRQ all in one fits nothing interrupt handler | ||
361 | When: 2.6.32 | ||
362 | Why: __do_IRQ was kept for easy migration to the type flow handlers. | ||
363 | More than two years of migration time is enough. | ||
364 | Who: Thomas Gleixner <tglx@linutronix.de> | ||
365 | |||
366 | ----------------------------- | ||
367 | |||
368 | What: fakephp and associated sysfs files in /sys/bus/pci/slots/ | 360 | What: fakephp and associated sysfs files in /sys/bus/pci/slots/ |
369 | When: 2011 | 361 | When: 2011 |
370 | Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to | 362 | Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to |
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index dc73bc54cc4e..d9da7e148538 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -39,6 +39,9 @@ | |||
39 | #include <limits.h> | 39 | #include <limits.h> |
40 | #include <stddef.h> | 40 | #include <stddef.h> |
41 | #include <signal.h> | 41 | #include <signal.h> |
42 | #include <pwd.h> | ||
43 | #include <grp.h> | ||
44 | |||
42 | #include <linux/virtio_config.h> | 45 | #include <linux/virtio_config.h> |
43 | #include <linux/virtio_net.h> | 46 | #include <linux/virtio_net.h> |
44 | #include <linux/virtio_blk.h> | 47 | #include <linux/virtio_blk.h> |
@@ -298,20 +301,27 @@ static void *map_zeroed_pages(unsigned int num) | |||
298 | 301 | ||
299 | /* | 302 | /* |
300 | * We use a private mapping (ie. if we write to the page, it will be | 303 | * We use a private mapping (ie. if we write to the page, it will be |
301 | * copied). | 304 | * copied). We allocate an extra two pages PROT_NONE to act as guard |
305 | * pages against read/write attempts that exceed allocated space. | ||
302 | */ | 306 | */ |
303 | addr = mmap(NULL, getpagesize() * num, | 307 | addr = mmap(NULL, getpagesize() * (num+2), |
304 | PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, fd, 0); | 308 | PROT_NONE, MAP_PRIVATE, fd, 0); |
309 | |||
305 | if (addr == MAP_FAILED) | 310 | if (addr == MAP_FAILED) |
306 | err(1, "Mmapping %u pages of /dev/zero", num); | 311 | err(1, "Mmapping %u pages of /dev/zero", num); |
307 | 312 | ||
313 | if (mprotect(addr + getpagesize(), getpagesize() * num, | ||
314 | PROT_READ|PROT_WRITE) == -1) | ||
315 | err(1, "mprotect rw %u pages failed", num); | ||
316 | |||
308 | /* | 317 | /* |
309 | * One neat mmap feature is that you can close the fd, and it | 318 | * One neat mmap feature is that you can close the fd, and it |
310 | * stays mapped. | 319 | * stays mapped. |
311 | */ | 320 | */ |
312 | close(fd); | 321 | close(fd); |
313 | 322 | ||
314 | return addr; | 323 | /* Return address after PROT_NONE page */ |
324 | return addr + getpagesize(); | ||
315 | } | 325 | } |
316 | 326 | ||
317 | /* Get some more pages for a device. */ | 327 | /* Get some more pages for a device. */ |
@@ -343,7 +353,7 @@ static void map_at(int fd, void *addr, unsigned long offset, unsigned long len) | |||
343 | * done to it. This allows us to share untouched memory between | 353 | * done to it. This allows us to share untouched memory between |
344 | * Guests. | 354 | * Guests. |
345 | */ | 355 | */ |
346 | if (mmap(addr, len, PROT_READ|PROT_WRITE|PROT_EXEC, | 356 | if (mmap(addr, len, PROT_READ|PROT_WRITE, |
347 | MAP_FIXED|MAP_PRIVATE, fd, offset) != MAP_FAILED) | 357 | MAP_FIXED|MAP_PRIVATE, fd, offset) != MAP_FAILED) |
348 | return; | 358 | return; |
349 | 359 | ||
@@ -573,10 +583,10 @@ static void *_check_pointer(unsigned long addr, unsigned int size, | |||
573 | unsigned int line) | 583 | unsigned int line) |
574 | { | 584 | { |
575 | /* | 585 | /* |
576 | * We have to separately check addr and addr+size, because size could | 586 | * Check if the requested address and size exceeds the allocated memory, |
577 | * be huge and addr + size might wrap around. | 587 | * or addr + size wraps around. |
578 | */ | 588 | */ |
579 | if (addr >= guest_limit || addr + size >= guest_limit) | 589 | if ((addr + size) > guest_limit || (addr + size) < addr) |
580 | errx(1, "%s:%i: Invalid address %#lx", __FILE__, line, addr); | 590 | errx(1, "%s:%i: Invalid address %#lx", __FILE__, line, addr); |
581 | /* | 591 | /* |
582 | * We return a pointer for the caller's convenience, now we know it's | 592 | * We return a pointer for the caller's convenience, now we know it's |
@@ -1872,6 +1882,8 @@ static struct option opts[] = { | |||
1872 | { "block", 1, NULL, 'b' }, | 1882 | { "block", 1, NULL, 'b' }, |
1873 | { "rng", 0, NULL, 'r' }, | 1883 | { "rng", 0, NULL, 'r' }, |
1874 | { "initrd", 1, NULL, 'i' }, | 1884 | { "initrd", 1, NULL, 'i' }, |
1885 | { "username", 1, NULL, 'u' }, | ||
1886 | { "chroot", 1, NULL, 'c' }, | ||
1875 | { NULL }, | 1887 | { NULL }, |
1876 | }; | 1888 | }; |
1877 | static void usage(void) | 1889 | static void usage(void) |
@@ -1894,6 +1906,12 @@ int main(int argc, char *argv[]) | |||
1894 | /* If they specify an initrd file to load. */ | 1906 | /* If they specify an initrd file to load. */ |
1895 | const char *initrd_name = NULL; | 1907 | const char *initrd_name = NULL; |
1896 | 1908 | ||
1909 | /* Password structure for initgroups/setres[gu]id */ | ||
1910 | struct passwd *user_details = NULL; | ||
1911 | |||
1912 | /* Directory to chroot to */ | ||
1913 | char *chroot_path = NULL; | ||
1914 | |||
1897 | /* Save the args: we "reboot" by execing ourselves again. */ | 1915 | /* Save the args: we "reboot" by execing ourselves again. */ |
1898 | main_args = argv; | 1916 | main_args = argv; |
1899 | 1917 | ||
@@ -1950,6 +1968,14 @@ int main(int argc, char *argv[]) | |||
1950 | case 'i': | 1968 | case 'i': |
1951 | initrd_name = optarg; | 1969 | initrd_name = optarg; |
1952 | break; | 1970 | break; |
1971 | case 'u': | ||
1972 | user_details = getpwnam(optarg); | ||
1973 | if (!user_details) | ||
1974 | err(1, "getpwnam failed, incorrect username?"); | ||
1975 | break; | ||
1976 | case 'c': | ||
1977 | chroot_path = optarg; | ||
1978 | break; | ||
1953 | default: | 1979 | default: |
1954 | warnx("Unknown argument %s", argv[optind]); | 1980 | warnx("Unknown argument %s", argv[optind]); |
1955 | usage(); | 1981 | usage(); |
@@ -2021,6 +2047,37 @@ int main(int argc, char *argv[]) | |||
2021 | /* If we exit via err(), this kills all the threads, restores tty. */ | 2047 | /* If we exit via err(), this kills all the threads, restores tty. */ |
2022 | atexit(cleanup_devices); | 2048 | atexit(cleanup_devices); |
2023 | 2049 | ||
2050 | /* If requested, chroot to a directory */ | ||
2051 | if (chroot_path) { | ||
2052 | if (chroot(chroot_path) != 0) | ||
2053 | err(1, "chroot(\"%s\") failed", chroot_path); | ||
2054 | |||
2055 | if (chdir("/") != 0) | ||
2056 | err(1, "chdir(\"/\") failed"); | ||
2057 | |||
2058 | verbose("chroot done\n"); | ||
2059 | } | ||
2060 | |||
2061 | /* If requested, drop privileges */ | ||
2062 | if (user_details) { | ||
2063 | uid_t u; | ||
2064 | gid_t g; | ||
2065 | |||
2066 | u = user_details->pw_uid; | ||
2067 | g = user_details->pw_gid; | ||
2068 | |||
2069 | if (initgroups(user_details->pw_name, g) != 0) | ||
2070 | err(1, "initgroups failed"); | ||
2071 | |||
2072 | if (setresgid(g, g, g) != 0) | ||
2073 | err(1, "setresgid failed"); | ||
2074 | |||
2075 | if (setresuid(u, u, u) != 0) | ||
2076 | err(1, "setresuid failed"); | ||
2077 | |||
2078 | verbose("Dropping privileges completed\n"); | ||
2079 | } | ||
2080 | |||
2024 | /* Finally, run the Guest. This doesn't return. */ | 2081 | /* Finally, run the Guest. This doesn't return. */ |
2025 | run_guest(); | 2082 | run_guest(); |
2026 | } | 2083 | } |
diff --git a/Documentation/lguest/lguest.txt b/Documentation/lguest/lguest.txt index 6ccaf8e1a00e..dad99978a6a8 100644 --- a/Documentation/lguest/lguest.txt +++ b/Documentation/lguest/lguest.txt | |||
@@ -117,6 +117,11 @@ Running Lguest: | |||
117 | 117 | ||
118 | for general information on how to get bridging to work. | 118 | for general information on how to get bridging to work. |
119 | 119 | ||
120 | - Random number generation. Using the --rng option will provide a | ||
121 | /dev/hwrng in the guest that will read from the host's /dev/random. | ||
122 | Use this option in conjunction with rng-tools (see ../hw_random.txt) | ||
123 | to provide entropy to the guest kernel's /dev/random. | ||
124 | |||
120 | There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest | 125 | There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest |
121 | 126 | ||
122 | Good luck! | 127 | Good luck! |
diff --git a/Documentation/sound/alsa/soc/codec.txt b/Documentation/sound/alsa/soc/codec.txt index 37ba3a72cb76..bce23a4a7875 100644 --- a/Documentation/sound/alsa/soc/codec.txt +++ b/Documentation/sound/alsa/soc/codec.txt | |||
@@ -27,42 +27,38 @@ ASoC Codec driver breakdown | |||
27 | 27 | ||
28 | 1 - Codec DAI and PCM configuration | 28 | 1 - Codec DAI and PCM configuration |
29 | ----------------------------------- | 29 | ----------------------------------- |
30 | Each codec driver must have a struct snd_soc_codec_dai to define its DAI and | 30 | Each codec driver must have a struct snd_soc_dai_driver to define its DAI and |
31 | PCM capabilities and operations. This struct is exported so that it can be | 31 | PCM capabilities and operations. This struct is exported so that it can be |
32 | registered with the core by your machine driver. | 32 | registered with the core by your machine driver. |
33 | 33 | ||
34 | e.g. | 34 | e.g. |
35 | 35 | ||
36 | struct snd_soc_codec_dai wm8731_dai = { | 36 | static struct snd_soc_dai_ops wm8731_dai_ops = { |
37 | .name = "WM8731", | 37 | .prepare = wm8731_pcm_prepare, |
38 | /* playback capabilities */ | 38 | .hw_params = wm8731_hw_params, |
39 | .shutdown = wm8731_shutdown, | ||
40 | .digital_mute = wm8731_mute, | ||
41 | .set_sysclk = wm8731_set_dai_sysclk, | ||
42 | .set_fmt = wm8731_set_dai_fmt, | ||
43 | }; | ||
44 | |||
45 | struct snd_soc_dai_driver wm8731_dai = { | ||
46 | .name = "wm8731-hifi", | ||
39 | .playback = { | 47 | .playback = { |
40 | .stream_name = "Playback", | 48 | .stream_name = "Playback", |
41 | .channels_min = 1, | 49 | .channels_min = 1, |
42 | .channels_max = 2, | 50 | .channels_max = 2, |
43 | .rates = WM8731_RATES, | 51 | .rates = WM8731_RATES, |
44 | .formats = WM8731_FORMATS,}, | 52 | .formats = WM8731_FORMATS,}, |
45 | /* capture capabilities */ | ||
46 | .capture = { | 53 | .capture = { |
47 | .stream_name = "Capture", | 54 | .stream_name = "Capture", |
48 | .channels_min = 1, | 55 | .channels_min = 1, |
49 | .channels_max = 2, | 56 | .channels_max = 2, |
50 | .rates = WM8731_RATES, | 57 | .rates = WM8731_RATES, |
51 | .formats = WM8731_FORMATS,}, | 58 | .formats = WM8731_FORMATS,}, |
52 | /* pcm operations - see section 4 below */ | 59 | .ops = &wm8731_dai_ops, |
53 | .ops = { | 60 | .symmetric_rates = 1, |
54 | .prepare = wm8731_pcm_prepare, | ||
55 | .hw_params = wm8731_hw_params, | ||
56 | .shutdown = wm8731_shutdown, | ||
57 | }, | ||
58 | /* DAI operations - see DAI.txt */ | ||
59 | .dai_ops = { | ||
60 | .digital_mute = wm8731_mute, | ||
61 | .set_sysclk = wm8731_set_dai_sysclk, | ||
62 | .set_fmt = wm8731_set_dai_fmt, | ||
63 | } | ||
64 | }; | 61 | }; |
65 | EXPORT_SYMBOL_GPL(wm8731_dai); | ||
66 | 62 | ||
67 | 63 | ||
68 | 2 - Codec control IO | 64 | 2 - Codec control IO |
@@ -186,13 +182,14 @@ when the mute is applied or freed. | |||
186 | 182 | ||
187 | i.e. | 183 | i.e. |
188 | 184 | ||
189 | static int wm8974_mute(struct snd_soc_codec *codec, | 185 | static int wm8974_mute(struct snd_soc_dai *dai, int mute) |
190 | struct snd_soc_codec_dai *dai, int mute) | ||
191 | { | 186 | { |
192 | u16 mute_reg = wm8974_read_reg_cache(codec, WM8974_DAC) & 0xffbf; | 187 | struct snd_soc_codec *codec = dai->codec; |
193 | if(mute) | 188 | u16 mute_reg = snd_soc_read(codec, WM8974_DAC) & 0xffbf; |
194 | wm8974_write(codec, WM8974_DAC, mute_reg | 0x40); | 189 | |
190 | if (mute) | ||
191 | snd_soc_write(codec, WM8974_DAC, mute_reg | 0x40); | ||
195 | else | 192 | else |
196 | wm8974_write(codec, WM8974_DAC, mute_reg); | 193 | snd_soc_write(codec, WM8974_DAC, mute_reg); |
197 | return 0; | 194 | return 0; |
198 | } | 195 | } |
diff --git a/Documentation/sound/alsa/soc/machine.txt b/Documentation/sound/alsa/soc/machine.txt index 2524c75557df..3e2ec9cbf397 100644 --- a/Documentation/sound/alsa/soc/machine.txt +++ b/Documentation/sound/alsa/soc/machine.txt | |||
@@ -12,6 +12,8 @@ the following struct:- | |||
12 | struct snd_soc_card { | 12 | struct snd_soc_card { |
13 | char *name; | 13 | char *name; |
14 | 14 | ||
15 | ... | ||
16 | |||
15 | int (*probe)(struct platform_device *pdev); | 17 | int (*probe)(struct platform_device *pdev); |
16 | int (*remove)(struct platform_device *pdev); | 18 | int (*remove)(struct platform_device *pdev); |
17 | 19 | ||
@@ -22,12 +24,13 @@ struct snd_soc_card { | |||
22 | int (*resume_pre)(struct platform_device *pdev); | 24 | int (*resume_pre)(struct platform_device *pdev); |
23 | int (*resume_post)(struct platform_device *pdev); | 25 | int (*resume_post)(struct platform_device *pdev); |
24 | 26 | ||
25 | /* machine stream operations */ | 27 | ... |
26 | struct snd_soc_ops *ops; | ||
27 | 28 | ||
28 | /* CPU <--> Codec DAI links */ | 29 | /* CPU <--> Codec DAI links */ |
29 | struct snd_soc_dai_link *dai_link; | 30 | struct snd_soc_dai_link *dai_link; |
30 | int num_links; | 31 | int num_links; |
32 | |||
33 | ... | ||
31 | }; | 34 | }; |
32 | 35 | ||
33 | probe()/remove() | 36 | probe()/remove() |
@@ -42,11 +45,6 @@ of any machine audio tasks that have to be done before or after the codec, DAIs | |||
42 | and DMA is suspended and resumed. Optional. | 45 | and DMA is suspended and resumed. Optional. |
43 | 46 | ||
44 | 47 | ||
45 | Machine operations | ||
46 | ------------------ | ||
47 | The machine specific audio operations can be set here. Again this is optional. | ||
48 | |||
49 | |||
50 | Machine DAI Configuration | 48 | Machine DAI Configuration |
51 | ------------------------- | 49 | ------------------------- |
52 | The machine DAI configuration glues all the codec and CPU DAIs together. It can | 50 | The machine DAI configuration glues all the codec and CPU DAIs together. It can |
@@ -61,8 +59,10 @@ struct snd_soc_dai_link is used to set up each DAI in your machine. e.g. | |||
61 | static struct snd_soc_dai_link corgi_dai = { | 59 | static struct snd_soc_dai_link corgi_dai = { |
62 | .name = "WM8731", | 60 | .name = "WM8731", |
63 | .stream_name = "WM8731", | 61 | .stream_name = "WM8731", |
64 | .cpu_dai = &pxa_i2s_dai, | 62 | .cpu_dai_name = "pxa-is2-dai", |
65 | .codec_dai = &wm8731_dai, | 63 | .codec_dai_name = "wm8731-hifi", |
64 | .platform_name = "pxa-pcm-audio", | ||
65 | .codec_name = "wm8713-codec.0-001a", | ||
66 | .init = corgi_wm8731_init, | 66 | .init = corgi_wm8731_init, |
67 | .ops = &corgi_ops, | 67 | .ops = &corgi_ops, |
68 | }; | 68 | }; |
@@ -77,26 +77,6 @@ static struct snd_soc_card snd_soc_corgi = { | |||
77 | }; | 77 | }; |
78 | 78 | ||
79 | 79 | ||
80 | Machine Audio Subsystem | ||
81 | ----------------------- | ||
82 | |||
83 | The machine soc device glues the platform, machine and codec driver together. | ||
84 | Private data can also be set here. e.g. | ||
85 | |||
86 | /* corgi audio private data */ | ||
87 | static struct wm8731_setup_data corgi_wm8731_setup = { | ||
88 | .i2c_address = 0x1b, | ||
89 | }; | ||
90 | |||
91 | /* corgi audio subsystem */ | ||
92 | static struct snd_soc_device corgi_snd_devdata = { | ||
93 | .machine = &snd_soc_corgi, | ||
94 | .platform = &pxa2xx_soc_platform, | ||
95 | .codec_dev = &soc_codec_dev_wm8731, | ||
96 | .codec_data = &corgi_wm8731_setup, | ||
97 | }; | ||
98 | |||
99 | |||
100 | Machine Power Map | 80 | Machine Power Map |
101 | ----------------- | 81 | ----------------- |
102 | 82 | ||
diff --git a/Documentation/sound/alsa/soc/platform.txt b/Documentation/sound/alsa/soc/platform.txt index 06d835987c6a..d57efad37e0a 100644 --- a/Documentation/sound/alsa/soc/platform.txt +++ b/Documentation/sound/alsa/soc/platform.txt | |||
@@ -20,9 +20,10 @@ struct snd_soc_ops { | |||
20 | int (*trigger)(struct snd_pcm_substream *, int); | 20 | int (*trigger)(struct snd_pcm_substream *, int); |
21 | }; | 21 | }; |
22 | 22 | ||
23 | The platform driver exports its DMA functionality via struct snd_soc_platform:- | 23 | The platform driver exports its DMA functionality via struct |
24 | snd_soc_platform_driver:- | ||
24 | 25 | ||
25 | struct snd_soc_platform { | 26 | struct snd_soc_platform_driver { |
26 | char *name; | 27 | char *name; |
27 | 28 | ||
28 | int (*probe)(struct platform_device *pdev); | 29 | int (*probe)(struct platform_device *pdev); |
@@ -34,6 +35,13 @@ struct snd_soc_platform { | |||
34 | int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *); | 35 | int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *); |
35 | void (*pcm_free)(struct snd_pcm *); | 36 | void (*pcm_free)(struct snd_pcm *); |
36 | 37 | ||
38 | /* | ||
39 | * For platform caused delay reporting. | ||
40 | * Optional. | ||
41 | */ | ||
42 | snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *, | ||
43 | struct snd_soc_dai *); | ||
44 | |||
37 | /* platform stream ops */ | 45 | /* platform stream ops */ |
38 | struct snd_pcm_ops *pcm_ops; | 46 | struct snd_pcm_ops *pcm_ops; |
39 | }; | 47 | }; |
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt index 8773778d23fc..881e7f44491b 100644 --- a/Documentation/video4linux/v4l2-controls.txt +++ b/Documentation/video4linux/v4l2-controls.txt | |||
@@ -285,6 +285,9 @@ implement g_volatile_ctrl like this: | |||
285 | The 'new value' union is not used in g_volatile_ctrl. In general controls | 285 | The 'new value' union is not used in g_volatile_ctrl. In general controls |
286 | that need to implement g_volatile_ctrl are read-only controls. | 286 | that need to implement g_volatile_ctrl are read-only controls. |
287 | 287 | ||
288 | Note that if one or more controls in a control cluster are marked as volatile, | ||
289 | then all the controls in the cluster are seen as volatile. | ||
290 | |||
288 | To mark a control as volatile you have to set the is_volatile flag: | 291 | To mark a control as volatile you have to set the is_volatile flag: |
289 | 292 | ||
290 | ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...); | 293 | ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...); |
@@ -462,6 +465,15 @@ pointer to the v4l2_ctrl_ops struct that is used for that cluster. | |||
462 | Obviously, all controls in the cluster array must be initialized to either | 465 | Obviously, all controls in the cluster array must be initialized to either |
463 | a valid control or to NULL. | 466 | a valid control or to NULL. |
464 | 467 | ||
468 | In rare cases you might want to know which controls of a cluster actually | ||
469 | were set explicitly by the user. For this you can check the 'is_new' flag of | ||
470 | each control. For example, in the case of a volume/mute cluster the 'is_new' | ||
471 | flag of the mute control would be set if the user called VIDIOC_S_CTRL for | ||
472 | mute only. If the user would call VIDIOC_S_EXT_CTRLS for both mute and volume | ||
473 | controls, then the 'is_new' flag would be 1 for both controls. | ||
474 | |||
475 | The 'is_new' flag is always 1 when called from v4l2_ctrl_handler_setup(). | ||
476 | |||
465 | 477 | ||
466 | VIDIOC_LOG_STATUS Support | 478 | VIDIOC_LOG_STATUS Support |
467 | ========================= | 479 | ========================= |