aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-09-10 09:32:51 -0400
committerTakashi Iwai <tiwai@suse.de>2009-09-10 09:32:51 -0400
commit6a0f4021469727675b83d85ac91d106bfae0e2c3 (patch)
treec6d7ffd99db592f4b7c294d1a5a7b54284012673 /sound/core
parentf9892a52e2405b4c5fa205d4f18ad292cb7e40bb (diff)
parentb888d1ce82ebd2bafecf64c765754968e78b4228 (diff)
Merge branch 'topic/dummy' into for-linus
* topic/dummy: ALSA: dummy - Increase MAX_PCM_SUBSTREAMS to 128 ALSA: dummy - Add debug proc file ALSA: Add const prefix to proc helper functions ALSA: Re-export snd_pcm_format_name() function ALSA: dummy - Fake buffer allocations ALSA: dummy - Fix the timer calculation in systimer mode ALSA: dummy - Add more description ALSA: dummy - Better jiffies handling ALSA: dummy - Support high-res timer mode
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/info.c4
-rw-r--r--sound/core/oss/mixer_oss.c3
-rw-r--r--sound/core/oss/pcm_oss.c3
-rw-r--r--sound/core/pcm.c26
4 files changed, 20 insertions, 16 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index 3d1f5137420a..d749a0d394a7 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -106,7 +106,7 @@ static int resize_info_buffer(struct snd_info_buffer *buffer,
106 * 106 *
107 * Returns the size of output string. 107 * Returns the size of output string.
108 */ 108 */
109int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...) 109int snd_iprintf(struct snd_info_buffer *buffer, const char *fmt, ...)
110{ 110{
111 va_list args; 111 va_list args;
112 int len, res; 112 int len, res;
@@ -725,7 +725,7 @@ EXPORT_SYMBOL(snd_info_get_line);
725 * Returns the updated pointer of the original string so that 725 * Returns the updated pointer of the original string so that
726 * it can be used for the next call. 726 * it can be used for the next call.
727 */ 727 */
728char *snd_info_get_str(char *dest, char *src, int len) 728const char *snd_info_get_str(char *dest, const char *src, int len)
729{ 729{
730 int c; 730 int c;
731 731
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 5dcd8a526970..772423889eb3 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -1154,7 +1154,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
1154 struct snd_info_buffer *buffer) 1154 struct snd_info_buffer *buffer)
1155{ 1155{
1156 struct snd_mixer_oss *mixer = entry->private_data; 1156 struct snd_mixer_oss *mixer = entry->private_data;
1157 char line[128], str[32], idxstr[16], *cptr; 1157 char line[128], str[32], idxstr[16];
1158 const char *cptr;
1158 int ch, idx; 1159 int ch, idx;
1159 struct snd_mixer_oss_assign_table *tbl; 1160 struct snd_mixer_oss_assign_table *tbl;
1160 struct slot *slot; 1161 struct slot *slot;
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index dbe406b82591..d8b2d76125b4 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -2836,7 +2836,8 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry,
2836 struct snd_info_buffer *buffer) 2836 struct snd_info_buffer *buffer)
2837{ 2837{
2838 struct snd_pcm_str *pstr = entry->private_data; 2838 struct snd_pcm_str *pstr = entry->private_data;
2839 char line[128], str[32], task_name[32], *ptr; 2839 char line[128], str[32], task_name[32];
2840 const char *ptr;
2840 int idx1; 2841 int idx1;
2841 struct snd_pcm_oss_setup *setup, *setup1, template; 2842 struct snd_pcm_oss_setup *setup, *setup1, template;
2842 2843
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 145931a9ff30..0c1440121c22 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -162,18 +162,7 @@ static int snd_pcm_control_ioctl(struct snd_card *card,
162 return -ENOIOCTLCMD; 162 return -ENOIOCTLCMD;
163} 163}
164 164
165#ifdef CONFIG_SND_VERBOSE_PROCFS
166
167#define STATE(v) [SNDRV_PCM_STATE_##v] = #v
168#define STREAM(v) [SNDRV_PCM_STREAM_##v] = #v
169#define READY(v) [SNDRV_PCM_READY_##v] = #v
170#define XRUN(v) [SNDRV_PCM_XRUN_##v] = #v
171#define SILENCE(v) [SNDRV_PCM_SILENCE_##v] = #v
172#define TSTAMP(v) [SNDRV_PCM_TSTAMP_##v] = #v
173#define ACCESS(v) [SNDRV_PCM_ACCESS_##v] = #v
174#define START(v) [SNDRV_PCM_START_##v] = #v
175#define FORMAT(v) [SNDRV_PCM_FORMAT_##v] = #v 165#define FORMAT(v) [SNDRV_PCM_FORMAT_##v] = #v
176#define SUBFORMAT(v) [SNDRV_PCM_SUBFORMAT_##v] = #v
177 166
178static char *snd_pcm_format_names[] = { 167static char *snd_pcm_format_names[] = {
179 FORMAT(S8), 168 FORMAT(S8),
@@ -216,10 +205,23 @@ static char *snd_pcm_format_names[] = {
216 FORMAT(U18_3BE), 205 FORMAT(U18_3BE),
217}; 206};
218 207
219static const char *snd_pcm_format_name(snd_pcm_format_t format) 208const char *snd_pcm_format_name(snd_pcm_format_t format)
220{ 209{
221 return snd_pcm_format_names[format]; 210 return snd_pcm_format_names[format];
222} 211}
212EXPORT_SYMBOL_GPL(snd_pcm_format_name);
213
214#ifdef CONFIG_SND_VERBOSE_PROCFS
215
216#define STATE(v) [SNDRV_PCM_STATE_##v] = #v
217#define STREAM(v) [SNDRV_PCM_STREAM_##v] = #v
218#define READY(v) [SNDRV_PCM_READY_##v] = #v
219#define XRUN(v) [SNDRV_PCM_XRUN_##v] = #v
220#define SILENCE(v) [SNDRV_PCM_SILENCE_##v] = #v
221#define TSTAMP(v) [SNDRV_PCM_TSTAMP_##v] = #v
222#define ACCESS(v) [SNDRV_PCM_ACCESS_##v] = #v
223#define START(v) [SNDRV_PCM_START_##v] = #v
224#define SUBFORMAT(v) [SNDRV_PCM_SUBFORMAT_##v] = #v
223 225
224static char *snd_pcm_stream_names[] = { 226static char *snd_pcm_stream_names[] = {
225 STREAM(PLAYBACK), 227 STREAM(PLAYBACK),