Skip to content

Commit 1987f17

Browse files
author
James Morris
committed
Merge branch 'master' into next
2 parents 7198e2e + 0384e29 commit 1987f17

File tree

1,122 files changed

+51791
-23412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,122 files changed

+51791
-23412
lines changed

Documentation/DocBook/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
1212
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
1313
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
1414
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
15-
mac80211.xml debugobjects.xml sh.xml regulator.xml
15+
mac80211.xml debugobjects.xml sh.xml regulator.xml \
16+
alsa-driver-api.xml writing-an-alsa-driver.xml
1617

1718
###
1819
# The build process is as follows (targets):

Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl renamed to Documentation/DocBook/alsa-driver-api.tmpl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2-
3-
<book>
4-
<?dbhtml filename="index.html">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3+
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
54

65
<!-- ****************************************************** -->
76
<!-- Header -->
87
<!-- ****************************************************** -->
8+
<book id="ALSA-Driver-API">
99
<bookinfo>
1010
<title>The ALSA Driver API</title>
1111

@@ -35,6 +35,8 @@
3535

3636
</bookinfo>
3737

38+
<toc></toc>
39+
3840
<chapter><title>Management of Cards and Devices</title>
3941
<sect1><title>Card Management</title>
4042
!Esound/core/init.c
@@ -71,6 +73,10 @@
7173
!Esound/pci/ac97/ac97_codec.c
7274
!Esound/pci/ac97/ac97_pcm.c
7375
</sect1>
76+
<sect1><title>Virtual Master Control API</title>
77+
!Esound/core/vmaster.c
78+
!Iinclude/sound/control.h
79+
</sect1>
7480
</chapter>
7581
<chapter><title>MIDI API</title>
7682
<sect1><title>Raw MIDI API</title>
@@ -88,6 +94,9 @@
8894
<chapter><title>Miscellaneous Functions</title>
8995
<sect1><title>Hardware-Dependent Devices API</title>
9096
!Esound/core/hwdep.c
97+
</sect1>
98+
<sect1><title>Jack Abstraction Layer API</title>
99+
!Esound/core/jack.c
91100
</sect1>
92101
<sect1><title>ISA DMA Helpers</title>
93102
!Esound/core/isadma.c

Documentation/DocBook/uio-howto.tmpl

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ GPL version 2.
4141
</abstract>
4242

4343
<revhistory>
44+
<revision>
45+
<revnumber>0.8</revnumber>
46+
<date>2008-12-24</date>
47+
<authorinitials>hjk</authorinitials>
48+
<revremark>Added name attributes in mem and portio sysfs directories.
49+
</revremark>
50+
</revision>
4451
<revision>
4552
<revnumber>0.7</revnumber>
4653
<date>2008-12-23</date>
@@ -303,10 +310,17 @@ interested in translating it, please email me
303310
appear if the size of the mapping is not 0.
304311
</para>
305312
<para>
306-
Each <filename>mapX/</filename> directory contains two read-only files
307-
that show start address and size of the memory:
313+
Each <filename>mapX/</filename> directory contains four read-only files
314+
that show attributes of the memory:
308315
</para>
309316
<itemizedlist>
317+
<listitem>
318+
<para>
319+
<filename>name</filename>: A string identifier for this mapping. This
320+
is optional, the string can be empty. Drivers can set this to make it
321+
easier for userspace to find the correct mapping.
322+
</para>
323+
</listitem>
310324
<listitem>
311325
<para>
312326
<filename>addr</filename>: The address of memory that can be mapped.
@@ -366,10 +380,17 @@ offset = N * getpagesize();
366380
<filename>/sys/class/uio/uioX/portio/</filename>.
367381
</para>
368382
<para>
369-
Each <filename>portX/</filename> directory contains three read-only
370-
files that show start, size, and type of the port region:
383+
Each <filename>portX/</filename> directory contains four read-only
384+
files that show name, start, size, and type of the port region:
371385
</para>
372386
<itemizedlist>
387+
<listitem>
388+
<para>
389+
<filename>name</filename>: A string identifier for this port region.
390+
The string is optional and can be empty. Drivers can set it to make it
391+
easier for userspace to find a certain port region.
392+
</para>
393+
</listitem>
373394
<listitem>
374395
<para>
375396
<filename>start</filename>: The first port of this region.

Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl renamed to Documentation/DocBook/writing-an-alsa-driver.tmpl

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2-
3-
<book>
4-
<?dbhtml filename="index.html">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3+
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
54

65
<!-- ****************************************************** -->
76
<!-- Header -->
87
<!-- ****************************************************** -->
8+
<book id="Writing-an-ALSA-Driver">
99
<bookinfo>
1010
<title>Writing an ALSA Driver</title>
1111
<author>
@@ -492,9 +492,9 @@
492492
}
493493
494494
/* (2) */
495-
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
496-
if (card == NULL)
497-
return -ENOMEM;
495+
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
496+
if (err < 0)
497+
return err;
498498
499499
/* (3) */
500500
err = snd_mychip_create(card, pci, &chip);
@@ -590,8 +590,9 @@
590590
<programlisting>
591591
<![CDATA[
592592
struct snd_card *card;
593+
int err;
593594
....
594-
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
595+
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
595596
]]>
596597
</programlisting>
597598
</informalexample>
@@ -809,26 +810,28 @@
809810

810811
<para>
811812
As mentioned above, to create a card instance, call
812-
<function>snd_card_new()</function>.
813+
<function>snd_card_create()</function>.
813814

814815
<informalexample>
815816
<programlisting>
816817
<![CDATA[
817818
struct snd_card *card;
818-
card = snd_card_new(index, id, module, extra_size);
819+
int err;
820+
err = snd_card_create(index, id, module, extra_size, &card);
819821
]]>
820822
</programlisting>
821823
</informalexample>
822824
</para>
823825

824826
<para>
825-
The function takes four arguments, the card-index number, the
827+
The function takes five arguments, the card-index number, the
826828
id string, the module pointer (usually
827829
<constant>THIS_MODULE</constant>),
828-
and the size of extra-data space. The last argument is used to
830+
the size of extra-data space, and the pointer to return the
831+
card instance. The extra_size argument is used to
829832
allocate card-&gt;private_data for the
830833
chip-specific data. Note that these data
831-
are allocated by <function>snd_card_new()</function>.
834+
are allocated by <function>snd_card_create()</function>.
832835
</para>
833836
</section>
834837

@@ -915,15 +918,16 @@
915918
</para>
916919

917920
<section id="card-management-chip-specific-snd-card-new">
918-
<title>1. Allocating via <function>snd_card_new()</function>.</title>
921+
<title>1. Allocating via <function>snd_card_create()</function>.</title>
919922
<para>
920923
As mentioned above, you can pass the extra-data-length
921-
to the 4th argument of <function>snd_card_new()</function>, i.e.
924+
to the 4th argument of <function>snd_card_create()</function>, i.e.
922925

923926
<informalexample>
924927
<programlisting>
925928
<![CDATA[
926-
card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct mychip));
929+
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
930+
sizeof(struct mychip), &card);
927931
]]>
928932
</programlisting>
929933
</informalexample>
@@ -952,16 +956,16 @@
952956

953957
<para>
954958
After allocating a card instance via
955-
<function>snd_card_new()</function> (with
956-
<constant>NULL</constant> on the 4th arg), call
959+
<function>snd_card_create()</function> (with
960+
<constant>0</constant> on the 4th arg), call
957961
<function>kzalloc()</function>.
958962

959963
<informalexample>
960964
<programlisting>
961965
<![CDATA[
962966
struct snd_card *card;
963967
struct mychip *chip;
964-
card = snd_card_new(index[dev], id[dev], THIS_MODULE, NULL);
968+
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
965969
.....
966970
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
967971
]]>
@@ -5750,8 +5754,9 @@ struct _snd_pcm_runtime {
57505754
....
57515755
struct snd_card *card;
57525756
struct mychip *chip;
5757+
int err;
57535758
....
5754-
card = snd_card_new(index[dev], id[dev], THIS_MODULE, NULL);
5759+
err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
57555760
....
57565761
chip = kzalloc(sizeof(*chip), GFP_KERNEL);
57575762
....
@@ -5763,7 +5768,7 @@ struct _snd_pcm_runtime {
57635768
</informalexample>
57645769

57655770
When you created the chip data with
5766-
<function>snd_card_new()</function>, it's anyway accessible
5771+
<function>snd_card_create()</function>, it's anyway accessible
57675772
via <structfield>private_data</structfield> field.
57685773

57695774
<informalexample>
@@ -5775,9 +5780,10 @@ struct _snd_pcm_runtime {
57755780
....
57765781
struct snd_card *card;
57775782
struct mychip *chip;
5783+
int err;
57785784
....
5779-
card = snd_card_new(index[dev], id[dev], THIS_MODULE,
5780-
sizeof(struct mychip));
5785+
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
5786+
sizeof(struct mychip), &card);
57815787
....
57825788
chip = card->private_data;
57835789
....

Documentation/cpu-freq/governors.txt

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,28 @@ accessible parameters:
117117
sampling_rate: measured in uS (10^-6 seconds), this is how often you
118118
want the kernel to look at the CPU usage and to make decisions on
119119
what to do about the frequency. Typically this is set to values of
120-
around '10000' or more.
121-
122-
show_sampling_rate_(min|max): the minimum and maximum sampling rates
123-
available that you may set 'sampling_rate' to.
120+
around '10000' or more. It's default value is (cmp. with users-guide.txt):
121+
transition_latency * 1000
122+
The lowest value you can set is:
123+
transition_latency * 100 or it may get restricted to a value where it
124+
makes not sense for the kernel anymore to poll that often which depends
125+
on your HZ config variable (HZ=1000: max=20000us, HZ=250: max=5000).
126+
Be aware that transition latency is in ns and sampling_rate is in us, so you
127+
get the same sysfs value by default.
128+
Sampling rate should always get adjusted considering the transition latency
129+
To set the sampling rate 750 times as high as the transition latency
130+
in the bash (as said, 1000 is default), do:
131+
echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) \
132+
>ondemand/sampling_rate
133+
134+
show_sampling_rate_(min|max): THIS INTERFACE IS DEPRECATED, DON'T USE IT.
135+
You can use wider ranges now and the general
136+
cpuinfo_transition_latency variable (cmp. with user-guide.txt) can be
137+
used to obtain exactly the same info:
138+
show_sampling_rate_min = transtition_latency * 500 / 1000
139+
show_sampling_rate_max = transtition_latency * 500000 / 1000
140+
(divided by 1000 is to illustrate that sampling rate is in us and
141+
transition latency is exported ns).
124142

125143
up_threshold: defines what the average CPU usage between the samplings
126144
of 'sampling_rate' needs to be for the kernel to make a decision on

Documentation/cpu-freq/user-guide.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ cpuinfo_min_freq : this file shows the minimum operating
152152
frequency the processor can run at(in kHz)
153153
cpuinfo_max_freq : this file shows the maximum operating
154154
frequency the processor can run at(in kHz)
155+
cpuinfo_transition_latency The time it takes on this CPU to
156+
switch between two frequencies in nano
157+
seconds. If unknown or known to be
158+
that high that the driver does not
159+
work with the ondemand governor, -1
160+
(CPUFREQ_ETERNAL) will be returned.
161+
Using this information can be useful
162+
to choose an appropriate polling
163+
frequency for a kernel governor or
164+
userspace daemon. Make sure to not
165+
switch the frequency too often
166+
resulting in performance loss.
155167
scaling_driver : this file shows what cpufreq driver is
156168
used to set the frequency on this CPU
157169

0 commit comments

Comments
 (0)