diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-03 12:10:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-03 12:10:23 -0400 |
commit | 9992ba72327fa0d8bdc9fb624e80f5cce338a711 (patch) | |
tree | e0bf31ae53cb19c44674df7e0d0343a26037ad34 /sound/core/info.c | |
parent | 00fdffb5131125dce0702bf61e24a806ec3aed80 (diff) | |
parent | 4ca231b2e6ed171107c5b21f9e92d1965fd6fd9e (diff) |
Merge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"Mostly many small changes spread as seen in diffstat in sound/*
directory by this update. A significant change in the subsystem level
is the introduction of snd_soc_component, which will help more generic
handling of SoC and off-SoC components.
Also, snd_BUG_ON() macro is enabled unconditionally now due to its
misuses, so people might hit kernel warnings (it's a good thing for
us).
- compress-offload: support for capture by Charles Keepax
- HD-audio: codec delay support by Dylan Reid
- HD-audio: improvements/fixes in generic parser: better headphone
mic and headset mic support, jack_modes hint consolidation, proper
beep attach/detachment, generalized power filter controls by David
Henningsson, et al
- HD-audio: Improved management of HDMI codec pins/converters
- HD-audio: Better pin/DAC assignment for VIA codecs
- HD-audio: Haswell HDMI workarounds
- HD-audio: ALC268 codec support, a few new quirks for Chromebooks
- USB: regression fixes: USB-MIDI autopm fix, the recent ISO latency
fix by Clemens Ladisch
- USB: support for DSD formats by Daniel Mack
- USB: A few UAC2 device endian/cock fixes by Eldad Zack
- USB: quirks for Emu 192kHz support, Novation Twitch DJ controller,
Yamaha THRxx devices
- HDSPM: updates for TCO controls by Adrian Knoth
- ASoC: Add a snd_soc_component object type for generic handling of
SoC and off-SoC components by Kuninori Morimoto,
- dmaengine: a large set of cleanups and conversions by Lars-Peter
Clausen
- ASoC DAPM: performance optimizations from Ryo Tsutsui
- ASoC DAPM: support for mixer control sharing by Stephen Warren
- ASoC: multiplatform ARM cleanups from Arnd Bergmann
- ASoC: new codec drivers for AK5385 and TAS5086 from Daniel Mack"
* tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (315 commits)
ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatch
ALSA: asihpi: add format support check in snd_card_asihpi_capture_formats
ALSA: pcm_format_to_bits strong-typed conversion
ALSA: compress: fix the states to check for allowing read
ALSA: hda - Move Thinkpad X220 to use auto parser
ALSA: USB: adjust for changed 3.8 USB API
ALSA: usb - Avoid unnecessary sample rate changes on USB 2.0 clock sources
sound: oss/dmabuf: use dma_map_single
ALSA: ali5451: use mdelay instead of large udelay constants
ALSA: hda - Add the support for ALC286 codec
ALSA: usb-audio: USB quirk for Yamaha THR10C
ALSA: usb-audio: USB quirk for Yamaha THR5A
ALSA: usb-audio: USB quirk for Yamaha THR10
ALSA: usb-audio: Fix autopm error during probing
ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT
ALSA: sound kconfig typo
ALSA: emu10k1: Fix dock firmware loading
ASoC: ux500: forward declare msp_i2s_platform_data
ASoC: davinci-mcasp: Add Support BCLK-to-LRCLK ratio for TDM modes
ASoC: davinci-pcm, davinci-mcasp: Clean up active_serializers
...
Diffstat (limited to 'sound/core/info.c')
-rw-r--r-- | sound/core/info.c | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index 3c9bd6b10a96..e79baa11b60e 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -89,7 +89,7 @@ static int resize_info_buffer(struct snd_info_buffer *buffer, | |||
89 | char *nbuf; | 89 | char *nbuf; |
90 | 90 | ||
91 | nsize = PAGE_ALIGN(nsize); | 91 | nsize = PAGE_ALIGN(nsize); |
92 | nbuf = krealloc(buffer->buffer, nsize, GFP_KERNEL); | 92 | nbuf = krealloc(buffer->buffer, nsize, GFP_KERNEL | __GFP_ZERO); |
93 | if (! nbuf) | 93 | if (! nbuf) |
94 | return -ENOMEM; | 94 | return -ENOMEM; |
95 | 95 | ||
@@ -105,7 +105,7 @@ static int resize_info_buffer(struct snd_info_buffer *buffer, | |||
105 | * | 105 | * |
106 | * Outputs the string on the procfs buffer just like printf(). | 106 | * Outputs the string on the procfs buffer just like printf(). |
107 | * | 107 | * |
108 | * Returns the size of output string. | 108 | * Return: The size of output string, or a negative error code. |
109 | */ | 109 | */ |
110 | int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) | 110 | int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...) |
111 | { | 111 | { |
@@ -344,7 +344,7 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) | |||
344 | goto __nomem; | 344 | goto __nomem; |
345 | data->rbuffer = buffer; | 345 | data->rbuffer = buffer; |
346 | buffer->len = PAGE_SIZE; | 346 | buffer->len = PAGE_SIZE; |
347 | buffer->buffer = kmalloc(buffer->len, GFP_KERNEL); | 347 | buffer->buffer = kzalloc(buffer->len, GFP_KERNEL); |
348 | if (buffer->buffer == NULL) | 348 | if (buffer->buffer == NULL) |
349 | goto __nomem; | 349 | goto __nomem; |
350 | } | 350 | } |
@@ -683,32 +683,27 @@ int snd_info_card_free(struct snd_card *card) | |||
683 | * | 683 | * |
684 | * Reads one line from the buffer and stores the string. | 684 | * Reads one line from the buffer and stores the string. |
685 | * | 685 | * |
686 | * Returns zero if successful, or 1 if error or EOF. | 686 | * Return: Zero if successful, or 1 if error or EOF. |
687 | */ | 687 | */ |
688 | int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) | 688 | int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) |
689 | { | 689 | { |
690 | int c = -1; | 690 | int c = -1; |
691 | 691 | ||
692 | if (snd_BUG_ON(!buffer || !buffer->buffer)) | ||
693 | return 1; | ||
692 | if (len <= 0 || buffer->stop || buffer->error) | 694 | if (len <= 0 || buffer->stop || buffer->error) |
693 | return 1; | 695 | return 1; |
694 | while (--len > 0) { | 696 | while (!buffer->stop) { |
695 | c = buffer->buffer[buffer->curr++]; | 697 | c = buffer->buffer[buffer->curr++]; |
696 | if (c == '\n') { | 698 | if (buffer->curr >= buffer->size) |
697 | if (buffer->curr >= buffer->size) | ||
698 | buffer->stop = 1; | ||
699 | break; | ||
700 | } | ||
701 | *line++ = c; | ||
702 | if (buffer->curr >= buffer->size) { | ||
703 | buffer->stop = 1; | 699 | buffer->stop = 1; |
700 | if (c == '\n') | ||
704 | break; | 701 | break; |
702 | if (len) { | ||
703 | len--; | ||
704 | *line++ = c; | ||
705 | } | 705 | } |
706 | } | 706 | } |
707 | while (c != '\n' && !buffer->stop) { | ||
708 | c = buffer->buffer[buffer->curr++]; | ||
709 | if (buffer->curr >= buffer->size) | ||
710 | buffer->stop = 1; | ||
711 | } | ||
712 | *line = '\0'; | 707 | *line = '\0'; |
713 | return 0; | 708 | return 0; |
714 | } | 709 | } |
@@ -724,7 +719,7 @@ EXPORT_SYMBOL(snd_info_get_line); | |||
724 | * Parses the original string and copy a token to the given | 719 | * Parses the original string and copy a token to the given |
725 | * string buffer. | 720 | * string buffer. |
726 | * | 721 | * |
727 | * Returns the updated pointer of the original string so that | 722 | * Return: The updated pointer of the original string so that |
728 | * it can be used for the next call. | 723 | * it can be used for the next call. |
729 | */ | 724 | */ |
730 | const char *snd_info_get_str(char *dest, const char *src, int len) | 725 | const char *snd_info_get_str(char *dest, const char *src, int len) |
@@ -763,7 +758,7 @@ EXPORT_SYMBOL(snd_info_get_str); | |||
763 | * Usually called from other functions such as | 758 | * Usually called from other functions such as |
764 | * snd_info_create_card_entry(). | 759 | * snd_info_create_card_entry(). |
765 | * | 760 | * |
766 | * Returns the pointer of the new instance, or NULL on failure. | 761 | * Return: The pointer of the new instance, or %NULL on failure. |
767 | */ | 762 | */ |
768 | static struct snd_info_entry *snd_info_create_entry(const char *name) | 763 | static struct snd_info_entry *snd_info_create_entry(const char *name) |
769 | { | 764 | { |
@@ -792,7 +787,7 @@ static struct snd_info_entry *snd_info_create_entry(const char *name) | |||
792 | * | 787 | * |
793 | * Creates a new info entry and assigns it to the given module. | 788 | * Creates a new info entry and assigns it to the given module. |
794 | * | 789 | * |
795 | * Returns the pointer of the new instance, or NULL on failure. | 790 | * Return: The pointer of the new instance, or %NULL on failure. |
796 | */ | 791 | */ |
797 | struct snd_info_entry *snd_info_create_module_entry(struct module * module, | 792 | struct snd_info_entry *snd_info_create_module_entry(struct module * module, |
798 | const char *name, | 793 | const char *name, |
@@ -816,7 +811,7 @@ EXPORT_SYMBOL(snd_info_create_module_entry); | |||
816 | * | 811 | * |
817 | * Creates a new info entry and assigns it to the given card. | 812 | * Creates a new info entry and assigns it to the given card. |
818 | * | 813 | * |
819 | * Returns the pointer of the new instance, or NULL on failure. | 814 | * Return: The pointer of the new instance, or %NULL on failure. |
820 | */ | 815 | */ |
821 | struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, | 816 | struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, |
822 | const char *name, | 817 | const char *name, |
@@ -882,7 +877,7 @@ static int snd_info_dev_register_entry(struct snd_device *device) | |||
882 | * For releasing this entry, use snd_device_free() instead of | 877 | * For releasing this entry, use snd_device_free() instead of |
883 | * snd_info_free_entry(). | 878 | * snd_info_free_entry(). |
884 | * | 879 | * |
885 | * Returns zero if successful, or a negative error code on failure. | 880 | * Return: Zero if successful, or a negative error code on failure. |
886 | */ | 881 | */ |
887 | int snd_card_proc_new(struct snd_card *card, const char *name, | 882 | int snd_card_proc_new(struct snd_card *card, const char *name, |
888 | struct snd_info_entry **entryp) | 883 | struct snd_info_entry **entryp) |
@@ -938,7 +933,7 @@ EXPORT_SYMBOL(snd_info_free_entry); | |||
938 | * | 933 | * |
939 | * Registers the proc info entry. | 934 | * Registers the proc info entry. |
940 | * | 935 | * |
941 | * Returns zero if successful, or a negative error code on failure. | 936 | * Return: Zero if successful, or a negative error code on failure. |
942 | */ | 937 | */ |
943 | int snd_info_register(struct snd_info_entry * entry) | 938 | int snd_info_register(struct snd_info_entry * entry) |
944 | { | 939 | { |