diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 15:38:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 15:38:47 -0700 |
commit | c70929147a10fa4538886cb23b934b509c4c0e49 (patch) | |
tree | bd7c25f679b271fc81f2cedc7a70ef059586c353 /Documentation/DocBook | |
parent | 4b1779c2cf030c68aefe939d946475e4136c1895 (diff) | |
parent | 69dd89fd2b9406603d218cab8996cfb232d5b8b9 (diff) | |
download | op-kernel-dev-c70929147a10fa4538886cb23b934b509c4c0e49.zip op-kernel-dev-c70929147a10fa4538886cb23b934b509c4c0e49.tar.gz |
Merge tag 'sound-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"There have been lots of changes in ALSA core, HD-audio and ASoC, also
most of PCI drivers touched by conversions of printks. All these
resulted in a high volume and wide ranged patch sets in this release.
Many changes are fairly trivial, but also lots of nice cleanups and
refactors. There are a few new drivers, most notably, the Intel
Haswell and Baytrail ASoC driver.
Core changes:
- A bit modernization; embed the device struct into snd_card struct,
so that it may be referred from the beginning. A new
snd_card_new() function is introduced for that, and all drivers
have been converted.
- Simplification in the device management code in ALSA core; now
managed by a simple priority list instead
- Converted many kernel messages to use the standard dev_err() & co;
this would be the pretty visible difference, especially for
HD-audio.
HD-audio:
- Conexant codecs use the auto-parser as default now; the old static
code still remains in case of regressions. Some old quirks have
been rewritten with the fixups for auto-parser.
- C-Media codecs also use the auto-parser as default now, too.
- A device struct is assigned to each HD-audio codec, and the
formerly hwdep attributes are accessible over the codec sysfs, too.
hwdep attributes still remain for compatibility.
- Split the PCI-specific stuff for HD-audio controller into a
separate module, ane make a helper module for the generic
controller driver. This is a preliminary change for supporting
Tegra HDMI controller in near future, which slipped from 3.15
merge.
- Device-specific fixes: mute LED support for Lenovo Ideapad, mic LED
fix for HP laptops, more ASUS subwoofer quirks, yet more Dell
laptop headset quirks
- Make the HD-audio codec response a bit more robust
- A few improvements on Realtek ALC282 / 283 about the pop noises
- A couple of Intel HDMI fixes
ASoC:
- Lots of cleanups for enumerations; refactored lots of error prone
original codes to use more modern APIs
- Elimination of the ASoC level wrappers for I2C and SPI moving us
closer to converting to regmap completely and avoiding some
randconfig hassle
- Provide both manually and transparently locked DAPM APIs rather
than a mix of the two fixing some concurrency issues
- Start converting CODEC drivers to use separate bus interface
drivers rather than having them all in one file helping avoid
dependency issues
- DPCM support for Intel Haswell and Bay Trail platforms, lots of
fixes
- Lots of work on improvements for simple-card, DaVinci and the
Renesas rcar drivers.
- New drivers for Analog Devices ADAU1977, TI PCM512x and parts of
the CSR SiRF SoC, TLV320AIC31XXX, Armada 370 DB, Cirrus cs42xx8
- Fixes for the simple-card DAI format DT mess
- DT support for a couple more devices.
- Use of the tdm_slot mapping in a few drivers
Others:
- Support of reset_resume callback for improved S4 in USB-audio
driver; the device with boot quirks have been little tested, which
we need to watch out in this development cycle
- Add PM support for ICE1712 driver (finally!); it's still pretty
partial support, only for M-Audio devices"
* tag 'sound-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (610 commits)
ALSA: ice1712: Add suspend support for M-Audio ICE1712-based cards
ALSA: ice1712: add suspend support for ICE1712 chip
ALSA: hda - Enable beep for ASUS 1015E
ALSA: asihpi: fix some indenting in snd_card_asihpi_pcm_new()
ALSA: hda - add headset mic detect quirks for three Dell laptops
ASoC: tegra: move AC97 clock handling to the machine driver
ASoC: simple-card: Handle many DAI links
ASoC: simple-card: Add DT documentation for multi-DAI links
ASoC: simple-card: dynamically allocate the DAI link and properties
ASoC: imx-ssi: Add .xlate_tdm_slot_mask() support.
ASoC: fsl-esai: Add .xlate_tdm_slot_mask() support.
ASoC: fsl-utils: Add fsl_asoc_xlate_tdm_slot_mask() support.
ASoC: core: remove the 'of_' prefix of of_xlate_tdm_slot_mask.
ASoC: rcar: subnode tidyup for renesas,rsnd.txt
ASoC: Remove name_prefix unset during DAI link init hack
ALSA: hda - Inform the unexpectedly ignored pins by auto-parser
ASoC: rcar: bugfix: it cares about the non-src case
ARM: bockw: fixup SND_SOC_DAIFMT_CBx_CFx flags
ASoC: pcm: Drop incorrect double/extra frees
ASoC: mfld_machine: Fix compile error
...
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/writing-an-alsa-driver.tmpl | 72 |
1 files changed, 27 insertions, 45 deletions
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index 06741e9..d0056a4 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl @@ -468,8 +468,6 @@ return err; } - snd_card_set_dev(card, &pci->dev); - *rchip = chip; return 0; } @@ -492,7 +490,8 @@ } /* (2) */ - err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, + 0, &card); if (err < 0) return err; @@ -591,7 +590,8 @@ struct snd_card *card; int err; .... - err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, + 0, &card); ]]> </programlisting> </informalexample> @@ -809,28 +809,34 @@ <para> As mentioned above, to create a card instance, call - <function>snd_card_create()</function>. + <function>snd_card_new()</function>. <informalexample> <programlisting> <![CDATA[ struct snd_card *card; int err; - err = snd_card_create(index, id, module, extra_size, &card); + err = snd_card_new(&pci->dev, index, id, module, extra_size, &card); ]]> </programlisting> </informalexample> </para> <para> - The function takes five arguments, the card-index number, the - id string, the module pointer (usually + The function takes six arguments: the parent device pointer, + the card-index number, the id string, the module pointer (usually <constant>THIS_MODULE</constant>), the size of extra-data space, and the pointer to return the card instance. The extra_size argument is used to allocate card->private_data for the chip-specific data. Note that these data - are allocated by <function>snd_card_create()</function>. + are allocated by <function>snd_card_new()</function>. + </para> + + <para> + The first argument, the pointer of struct + <structname>device</structname>, specifies the parent device. + For PCI devices, typically &pci-> is passed there. </para> </section> @@ -916,16 +922,16 @@ </para> <section id="card-management-chip-specific-snd-card-new"> - <title>1. Allocating via <function>snd_card_create()</function>.</title> + <title>1. Allocating via <function>snd_card_new()</function>.</title> <para> As mentioned above, you can pass the extra-data-length - to the 4th argument of <function>snd_card_create()</function>, i.e. + to the 5th argument of <function>snd_card_new()</function>, i.e. <informalexample> <programlisting> <![CDATA[ - err = snd_card_create(index[dev], id[dev], THIS_MODULE, - sizeof(struct mychip), &card); + err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, + sizeof(struct mychip), &card); ]]> </programlisting> </informalexample> @@ -954,7 +960,7 @@ <para> After allocating a card instance via - <function>snd_card_create()</function> (with + <function>snd_card_new()</function> (with <constant>0</constant> on the 4th arg), call <function>kzalloc()</function>. @@ -963,7 +969,8 @@ <![CDATA[ struct snd_card *card; struct mychip *chip; - err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, + 0, &card); ..... chip = kzalloc(sizeof(*chip), GFP_KERNEL); ]]> @@ -1170,8 +1177,6 @@ return err; } - snd_card_set_dev(card, &pci->dev); - *rchip = chip; return 0; } @@ -1526,30 +1531,6 @@ </section> - <section id="pci-resource-device-struct"> - <title>Registration of Device Struct</title> - <para> - At some point, typically after calling <function>snd_device_new()</function>, - you need to register the struct <structname>device</structname> of the chip - you're handling for udev and co. ALSA provides a macro for compatibility with - older kernels. Simply call like the following: - <informalexample> - <programlisting> -<![CDATA[ - snd_card_set_dev(card, &pci->dev); -]]> - </programlisting> - </informalexample> - so that it stores the PCI's device pointer to the card. This will be - referred by ALSA core functions later when the devices are registered. - </para> - <para> - In the case of non-PCI, pass the proper device struct pointer of the BUS - instead. (In the case of legacy ISA without PnP, you don't have to do - anything.) - </para> - </section> - <section id="pci-resource-entries"> <title>PCI Entries</title> <para> @@ -5740,7 +5721,8 @@ struct _snd_pcm_runtime { struct mychip *chip; int err; .... - err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); + err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, + 0, &card); .... chip = kzalloc(sizeof(*chip), GFP_KERNEL); .... @@ -5752,7 +5734,7 @@ struct _snd_pcm_runtime { </informalexample> When you created the chip data with - <function>snd_card_create()</function>, it's anyway accessible + <function>snd_card_new()</function>, it's anyway accessible via <structfield>private_data</structfield> field. <informalexample> @@ -5766,8 +5748,8 @@ struct _snd_pcm_runtime { struct mychip *chip; int err; .... - err = snd_card_create(index[dev], id[dev], THIS_MODULE, - sizeof(struct mychip), &card); + err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, + sizeof(struct mychip), &card); .... chip = card->private_data; .... |