Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353236
b: refs/heads/master
c: 7da5804
h: refs/heads/master
v: v3
  • Loading branch information
Clemens Ladisch committed Jan 31, 2013
1 parent 63a9458 commit d2ddc56
Show file tree
Hide file tree
Showing 595 changed files with 28,515 additions and 14,386 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16c5ab1d3a6d1b11ed2966fa33a3a4fecd13a2bc
refs/heads/master: 7da58046482fceb17c4a0d4afefd9507ec56de7f
58 changes: 29 additions & 29 deletions trunk/Documentation/DocBook/writing-an-alsa-driver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,9 @@
<para>
This function itself doesn't allocate the data space. The data
must be allocated manually beforehand, and its pointer is passed
as the argument. This pointer (<parameter>chip</parameter> in the
above example) is used as the identifier for the instance.
as the argument. This pointer is used as the
(<parameter>chip</parameter> identifier in the above example)
for the instance.
</para>

<para>
Expand Down Expand Up @@ -2303,7 +2304,7 @@ struct _snd_pcm_runtime {
<constant>SNDRV_PCM_INFO_XXX</constant>. Here, at least, you
have to specify whether the mmap is supported and which
interleaved format is supported.
When the hardware supports mmap, add the
When the is supported, add the
<constant>SNDRV_PCM_INFO_MMAP</constant> flag here. When the
hardware supports the interleaved or the non-interleaved
formats, <constant>SNDRV_PCM_INFO_INTERLEAVED</constant> or
Expand Down Expand Up @@ -2897,7 +2898,7 @@ struct _snd_pcm_runtime {

<para>
When the pcm supports the pause operation (given in the info
field of the hardware table), the <constant>PAUSE_PUSH</constant>
field of the hardware table), the <constant>PAUSE_PUSE</constant>
and <constant>PAUSE_RELEASE</constant> commands must be
handled here, too. The former is the command to pause the pcm,
and the latter to restart the pcm again.
Expand Down Expand Up @@ -3084,7 +3085,7 @@ struct _snd_pcm_runtime {
<section id="pcm-interface-interrupt-handler-timer">
<title>High frequency timer interrupts</title>
<para>
This happens when the hardware doesn't generate interrupts
This happense when the hardware doesn't generate interrupts
at the period boundary but issues timer interrupts at a fixed
timer rate (e.g. es1968 or ymfpci drivers).
In this case, you need to check the current hardware
Expand Down Expand Up @@ -3250,19 +3251,18 @@ struct _snd_pcm_runtime {
<title>Example of Hardware Constraints for Channels</title>
<programlisting>
<![CDATA[
static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{
struct snd_interval *c = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS);
SNDRV_PCM_HW_PARAM_CHANNELS);
struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
struct snd_interval ch;
struct snd_mask fmt;
snd_interval_any(&ch);
if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
ch.min = ch.max = 1;
ch.integer = 1;
return snd_interval_refine(c, &ch);
snd_mask_any(&fmt); /* Init the struct */
if (c->min < 2) {
fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
return snd_mask_refine(f, &fmt);
}
return 0;
}
Expand All @@ -3278,35 +3278,35 @@ struct _snd_pcm_runtime {
<programlisting>
<![CDATA[
snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
hw_rule_channels_by_format, NULL,
SNDRV_PCM_HW_PARAM_FORMAT, -1);
hw_rule_channels_by_format, 0, SNDRV_PCM_HW_PARAM_FORMAT,
-1);
]]>
</programlisting>
</informalexample>
</para>

<para>
The rule function is called when an application sets the PCM
format, and it refines the number of channels accordingly.
But an application may set the number of channels before
setting the format. Thus you also need to define the inverse rule:
The rule function is called when an application sets the number of
channels. But an application can set the format before the number of
channels. Thus you also need to define the inverse rule:

<example>
<title>Example of Hardware Constraints for Formats</title>
<title>Example of Hardware Constraints for Channels</title>
<programlisting>
<![CDATA[
static int hw_rule_format_by_channels(struct snd_pcm_hw_params *params,
static int hw_rule_channels_by_format(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{
struct snd_interval *c = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS);
SNDRV_PCM_HW_PARAM_CHANNELS);
struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
struct snd_mask fmt;
struct snd_interval ch;
snd_mask_any(&fmt); /* Init the struct */
if (c->min < 2) {
fmt.bits[0] &= SNDRV_PCM_FMTBIT_S16_LE;
return snd_mask_refine(f, &fmt);
snd_interval_any(&ch);
if (f->bits[0] == SNDRV_PCM_FMTBIT_S16_LE) {
ch.min = ch.max = 1;
ch.integer = 1;
return snd_interval_refine(c, &ch);
}
return 0;
}
Expand All @@ -3321,8 +3321,8 @@ struct _snd_pcm_runtime {
<programlisting>
<![CDATA[
snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_FORMAT,
hw_rule_format_by_channels, NULL,
SNDRV_PCM_HW_PARAM_CHANNELS, -1);
hw_rule_format_by_channels, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
-1);
]]>
</programlisting>
</informalexample>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ PA31 TXD4
Required properties for pin configuration node:
- atmel,pins: 4 integers array, represents a group of pins mux and config
setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>.
The PERIPH 0 means gpio.
The PERIPH 0 means gpio, PERIPH 1 is periph A, PERIPH 2 is periph B...
PIN_BANK 0 is pioA, PIN_BANK 1 is pioB...

Bits used for CONFIG:
PULL_UP (1 << 0): indicate this pin need a pull up.
Expand Down Expand Up @@ -126,7 +127,7 @@ pinctrl@fffff400 {
pinctrl_dbgu: dbgu-0 {
atmel,pins =
<1 14 0x1 0x0 /* PB14 periph A */
1 15 0x1 0x1>; /* PB15 periph with pullup */
1 15 0x1 0x1>; /* PB15 periph A with pullup */
};
};
};
Expand Down
18 changes: 9 additions & 9 deletions trunk/Documentation/filesystems/f2fs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ consists of multiple segments as described below.
align with the zone size <-|
|-> align with the segment size
_________________________________________________________________________
| | | Node | Segment | Segment | |
| Superblock | Checkpoint | Address | Info. | Summary | Main |
| (SB) | (CP) | Table (NAT) | Table (SIT) | Area (SSA) | |
| | | Segment | Node | Segment | |
| Superblock | Checkpoint | Info. | Address | Summary | Main |
| (SB) | (CP) | Table (SIT) | Table (NAT) | Area (SSA) | |
|____________|_____2______|______N______|______N______|______N_____|__N___|
. .
. .
Expand All @@ -200,14 +200,14 @@ consists of multiple segments as described below.
: It contains file system information, bitmaps for valid NAT/SIT sets, orphan
inode lists, and summary entries of current active segments.

- Node Address Table (NAT)
: It is composed of a block address table for all the node blocks stored in
Main area.

- Segment Information Table (SIT)
: It contains segment information such as valid block count and bitmap for the
validity of all the blocks.

- Node Address Table (NAT)
: It is composed of a block address table for all the node blocks stored in
Main area.

- Segment Summary Area (SSA)
: It contains summary entries which contains the owner information of all the
data and node blocks stored in Main area.
Expand Down Expand Up @@ -236,13 +236,13 @@ For file system consistency, each CP points to which NAT and SIT copies are
valid, as shown as below.

+--------+----------+---------+
| CP | NAT | SIT |
| CP | SIT | NAT |
+--------+----------+---------+
. . . .
. . . .
. . . .
+-------+-------+--------+--------+--------+--------+
| CP #0 | CP #1 | NAT #0 | NAT #1 | SIT #0 | SIT #1 |
| CP #0 | CP #1 | SIT #0 | SIT #1 | NAT #0 | NAT #1 |
+-------+-------+--------+--------+--------+--------+
| ^ ^
| | |
Expand Down
5 changes: 2 additions & 3 deletions trunk/Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
enable_msi - Enable Message Signaled Interrupt (MSI) (default = off)
power_save - Automatic power-saving timeout (in second, 0 =
disable)
power_save_controller - Support runtime D3 of HD-audio controller
(-1 = on for supported chip (default), false = off,
true = force to on even for unsupported hardware)
power_save_controller - Reset HD-audio controller in power-saving mode
(default = on)
align_buffer_size - Force rounding of buffer/period sizes to multiples
of 128 bytes. This is more efficient in terms of memory
access but isn't required by the HDA spec and prevents
Expand Down
126 changes: 25 additions & 101 deletions trunk/Documentation/sound/alsa/HD-Audio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ support the automatic probing (yet as of 2.6.28). And, BIOS is often,
yes, pretty often broken. It sets up wrong values and screws up the
driver.

The preset model (or recently called as "fix-up") is provided
basically to overcome such a situation. When the matching preset
model is found in the white-list, the driver assumes the static
configuration of that preset with the correct pin setup, etc.
Thus, if you have a newer machine with a slightly different PCI SSID
(or codec SSID) from the existing one, you may have a good chance to
re-use the same model. You can pass the `model` option to specify the
preset model instead of PCI (and codec-) SSID look-up.
The preset model is provided basically to overcome such a situation.
When the matching preset model is found in the white-list, the driver
assumes the static configuration of that preset and builds the mixer
elements and PCM streams based on the static information. Thus, if
you have a newer machine with a slightly different PCI SSID from the
existing one, you may have a good chance to re-use the same model.
You can pass the `model` option to specify the preset model instead of
PCI SSID look-up.

What `model` option values are available depends on the codec chip.
Check your codec chip from the codec proc file (see "Codec Proc-File"
Expand All @@ -199,12 +199,17 @@ non-working HD-audio hardware is to check HD-audio codec and several
different `model` option values. If you have any luck, some of them
might suit with your device well.

There are a few special model option values:
- when 'nofixup' is passed, the device-specific fixups in the codec
parser are skipped.
- when `generic` is passed, the codec-specific parser is skipped and
only the generic parser is used.
Some codecs such as ALC880 have a special model option `model=test`.
This configures the driver to provide as many mixer controls as
possible for every single pin feature except for the unsolicited
events (and maybe some other specials). Adjust each mixer element and
try the I/O in the way of trial-and-error until figuring out the whole
I/O pin mappings.

Note that `model=generic` has a special meaning. It means to use the
generic parser regardless of the codec. Usually the codec-specific
parser is much better than the generic parser (as now). Thus this
option is more about the debugging purpose.

Speaker and Headphone Output
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -382,8 +387,9 @@ init_verbs::
(separated with a space).
hints::
Shows / stores hint strings for codec parsers for any use.
Its format is `key = value`. For example, passing `jack_detect = no`
will disable the jack detection of the machine completely.
Its format is `key = value`. For example, passing `hp_detect = yes`
to IDT/STAC codec parser will result in the disablement of the
headphone detection.
init_pin_configs::
Shows the initial pin default config values set by BIOS.
driver_pin_configs::
Expand Down Expand Up @@ -415,61 +421,6 @@ re-configure based on that state, run like below:
------------------------------------------------------------------------


Hint Strings
~~~~~~~~~~~~
The codec parser have several switches and adjustment knobs for
matching better with the actual codec or device behavior. Many of
them can be adjusted dynamically via "hints" strings as mentioned in
the section above. For example, by passing `jack_detect = no` string
via sysfs or a patch file, you can disable the jack detection, thus
the codec parser will skip the features like auto-mute or mic
auto-switch. As a boolean value, either `yes`, `no`, `true`, `false`,
`1` or `0` can be passed.

The generic parser supports the following hints:

- jack_detect (bool): specify whether the jack detection is available
at all on this machine; default true
- inv_jack_detect (bool): indicates that the jack detection logic is
inverted
- trigger_sense (bool): indicates that the jack detection needs the
explicit call of AC_VERB_SET_PIN_SENSE verb
- inv_eapd (bool): indicates that the EAPD is implemented in the
inverted logic
- pcm_format_first (bool): sets the PCM format before the stream tag
and channel ID
- sticky_stream (bool): keep the PCM format, stream tag and ID as long
as possible; default true
- spdif_status_reset (bool): reset the SPDIF status bits at each time
the SPDIF stream is set up
- pin_amp_workaround (bool): the output pin may have multiple amp
values
- single_adc_amp (bool): ADCs can have only single input amps
- auto_mute (bool): enable/disable the headphone auto-mute feature;
default true
- auto_mic (bool): enable/disable the mic auto-switch feature; default
true
- line_in_auto_switch (bool): enable/disable the line-in auto-switch
feature; default false
- need_dac_fix (bool): limits the DACs depending on the channel count
- primary_hp (bool): probe headphone jacks as the primary outputs;
default true
- multi_cap_vol (bool): provide multiple capture volumes
- inv_dmic_split (bool): provide split internal mic volume/switch for
phase-inverted digital mics
- indep_hp (bool): provide the independent headphone PCM stream and
the corresponding mixer control, if available
- add_stereo_mix_input (bool): add the stereo mix (analog-loopback
mix) to the input mux if available
- add_out_jack_modes (bool): add "xxx Jack Mode" enum controls to each
output jack for allowing to change the headphone amp capability
- add_in_jack_modes (bool): add "xxx Jack Mode" enum controls to each
input jack for allowing to change the mic bias vref
- power_down_unused (bool): power down the unused widgets
- mixer_nid (int): specifies the widget NID of the analog-loopback
mixer


Early Patching
~~~~~~~~~~~~~~
When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
Expand All @@ -494,7 +445,7 @@ A patch file is a plain text file which looks like below:
0x20 0x400 0xff

[hint]
jack_detect = no
hp_detect = yes
------------------------------------------------------------------------

The file needs to have a line `[codec]`. The next line should contain
Expand Down Expand Up @@ -580,13 +531,6 @@ cable is unplugged. Thus, if you hear noises, suspect first the
power-saving. See /sys/module/snd_hda_intel/parameters/power_save to
check the current value. If it's non-zero, the feature is turned on.

The recent kernel supports the runtime PM for the HD-audio controller
chip, too. It means that the HD-audio controller is also powered up /
down dynamically. The feature is enabled only for certain controller
chips like Intel LynxPoint. You can enable/disable this feature
forcibly by setting `power_save_controller` option, which is also
available at /sys/module/snd_hda_intel/parameters directory.


Tracepoints
~~~~~~~~~~~
Expand Down Expand Up @@ -643,9 +587,8 @@ The latest development codes for HD-audio are found on sound git tree:
- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git

The master branch or for-next branches can be used as the main
development branches in general while the development for the current
and next kernels are found in for-linus and for-next branches,
respectively.
development branches in general while the HD-audio specific patches
are committed in topic/hda branch.

If you are using the latest Linus tree, it'd be better to pull the
above GIT tree onto it. If you are using the older kernels, an easy
Expand Down Expand Up @@ -756,11 +699,7 @@ won't be always updated. For example, the volume values are usually
cached in the driver, and thus changing the widget amp value directly
via hda-verb won't change the mixer value.

The hda-verb program is included now in alsa-tools:

- git://git.alsa-project.org/alsa-tools.git

Also, the old stand-alone package is found in the ftp directory:
The hda-verb program is found in the ftp directory:

- ftp://ftp.suse.com/pub/people/tiwai/misc/

Expand Down Expand Up @@ -838,18 +777,3 @@ A git repository is available:

See README file in the tarball for more details about hda-emu
program.


hda-jack-retask
~~~~~~~~~~~~~~~
hda-jack-retask is a user-friendly GUI program to manipulate the
HD-audio pin control for jack retasking. If you have a problem about
the jack assignment, try this program and check whether you can get
useful results. Once when you figure out the proper pin assignment,
it can be fixed either in the driver code statically or via passing a
firmware patch file (see "Early Patching" section).

The program is included in alsa-tools now:

- git://git.alsa-project.org/alsa-tools.git

Loading

0 comments on commit d2ddc56

Please sign in to comment.