diff options
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 01a5e05ede95..b653ab001fba 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -190,12 +190,12 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream, | |||
190 | if (!(params->rmask & (1 << k))) | 190 | if (!(params->rmask & (1 << k))) |
191 | continue; | 191 | continue; |
192 | #ifdef RULES_DEBUG | 192 | #ifdef RULES_DEBUG |
193 | printk(KERN_DEBUG "%s = ", snd_pcm_hw_param_names[k]); | 193 | pr_debug("%s = ", snd_pcm_hw_param_names[k]); |
194 | printk("%04x%04x%04x%04x -> ", m->bits[3], m->bits[2], m->bits[1], m->bits[0]); | 194 | pr_cont("%04x%04x%04x%04x -> ", m->bits[3], m->bits[2], m->bits[1], m->bits[0]); |
195 | #endif | 195 | #endif |
196 | changed = snd_mask_refine(m, constrs_mask(constrs, k)); | 196 | changed = snd_mask_refine(m, constrs_mask(constrs, k)); |
197 | #ifdef RULES_DEBUG | 197 | #ifdef RULES_DEBUG |
198 | printk("%04x%04x%04x%04x\n", m->bits[3], m->bits[2], m->bits[1], m->bits[0]); | 198 | pr_cont("%04x%04x%04x%04x\n", m->bits[3], m->bits[2], m->bits[1], m->bits[0]); |
199 | #endif | 199 | #endif |
200 | if (changed) | 200 | if (changed) |
201 | params->cmask |= 1 << k; | 201 | params->cmask |= 1 << k; |
@@ -210,21 +210,21 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream, | |||
210 | if (!(params->rmask & (1 << k))) | 210 | if (!(params->rmask & (1 << k))) |
211 | continue; | 211 | continue; |
212 | #ifdef RULES_DEBUG | 212 | #ifdef RULES_DEBUG |
213 | printk(KERN_DEBUG "%s = ", snd_pcm_hw_param_names[k]); | 213 | pr_debug("%s = ", snd_pcm_hw_param_names[k]); |
214 | if (i->empty) | 214 | if (i->empty) |
215 | printk("empty"); | 215 | pr_cont("empty"); |
216 | else | 216 | else |
217 | printk("%c%u %u%c", | 217 | pr_cont("%c%u %u%c", |
218 | i->openmin ? '(' : '[', i->min, | 218 | i->openmin ? '(' : '[', i->min, |
219 | i->max, i->openmax ? ')' : ']'); | 219 | i->max, i->openmax ? ')' : ']'); |
220 | printk(" -> "); | 220 | pr_cont(" -> "); |
221 | #endif | 221 | #endif |
222 | changed = snd_interval_refine(i, constrs_interval(constrs, k)); | 222 | changed = snd_interval_refine(i, constrs_interval(constrs, k)); |
223 | #ifdef RULES_DEBUG | 223 | #ifdef RULES_DEBUG |
224 | if (i->empty) | 224 | if (i->empty) |
225 | printk("empty\n"); | 225 | pr_cont("empty\n"); |
226 | else | 226 | else |
227 | printk("%c%u %u%c\n", | 227 | pr_cont("%c%u %u%c\n", |
228 | i->openmin ? '(' : '[', i->min, | 228 | i->openmin ? '(' : '[', i->min, |
229 | i->max, i->openmax ? ')' : ']'); | 229 | i->max, i->openmax ? ')' : ']'); |
230 | #endif | 230 | #endif |
@@ -255,18 +255,18 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream, | |||
255 | if (!doit) | 255 | if (!doit) |
256 | continue; | 256 | continue; |
257 | #ifdef RULES_DEBUG | 257 | #ifdef RULES_DEBUG |
258 | printk(KERN_DEBUG "Rule %d [%p]: ", k, r->func); | 258 | pr_debug("Rule %d [%p]: ", k, r->func); |
259 | if (r->var >= 0) { | 259 | if (r->var >= 0) { |
260 | printk("%s = ", snd_pcm_hw_param_names[r->var]); | 260 | pr_cont("%s = ", snd_pcm_hw_param_names[r->var]); |
261 | if (hw_is_mask(r->var)) { | 261 | if (hw_is_mask(r->var)) { |
262 | m = hw_param_mask(params, r->var); | 262 | m = hw_param_mask(params, r->var); |
263 | printk("%x", *m->bits); | 263 | pr_cont("%x", *m->bits); |
264 | } else { | 264 | } else { |
265 | i = hw_param_interval(params, r->var); | 265 | i = hw_param_interval(params, r->var); |
266 | if (i->empty) | 266 | if (i->empty) |
267 | printk("empty"); | 267 | pr_cont("empty"); |
268 | else | 268 | else |
269 | printk("%c%u %u%c", | 269 | pr_cont("%c%u %u%c", |
270 | i->openmin ? '(' : '[', i->min, | 270 | i->openmin ? '(' : '[', i->min, |
271 | i->max, i->openmax ? ')' : ']'); | 271 | i->max, i->openmax ? ')' : ']'); |
272 | } | 272 | } |
@@ -275,19 +275,19 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream, | |||
275 | changed = r->func(params, r); | 275 | changed = r->func(params, r); |
276 | #ifdef RULES_DEBUG | 276 | #ifdef RULES_DEBUG |
277 | if (r->var >= 0) { | 277 | if (r->var >= 0) { |
278 | printk(" -> "); | 278 | pr_cont(" -> "); |
279 | if (hw_is_mask(r->var)) | 279 | if (hw_is_mask(r->var)) |
280 | printk("%x", *m->bits); | 280 | pr_cont("%x", *m->bits); |
281 | else { | 281 | else { |
282 | if (i->empty) | 282 | if (i->empty) |
283 | printk("empty"); | 283 | pr_cont("empty"); |
284 | else | 284 | else |
285 | printk("%c%u %u%c", | 285 | pr_cont("%c%u %u%c", |
286 | i->openmin ? '(' : '[', i->min, | 286 | i->openmin ? '(' : '[', i->min, |
287 | i->max, i->openmax ? ')' : ']'); | 287 | i->max, i->openmax ? ')' : ']'); |
288 | } | 288 | } |
289 | } | 289 | } |
290 | printk("\n"); | 290 | pr_cont("\n"); |
291 | #endif | 291 | #endif |
292 | rstamps[k] = stamp; | 292 | rstamps[k] = stamp; |
293 | if (changed && r->var >= 0) { | 293 | if (changed && r->var >= 0) { |
@@ -399,7 +399,7 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream, | |||
399 | return -EBADFD; | 399 | return -EBADFD; |
400 | } | 400 | } |
401 | snd_pcm_stream_unlock_irq(substream); | 401 | snd_pcm_stream_unlock_irq(substream); |
402 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | 402 | #if IS_ENABLED(CONFIG_SND_PCM_OSS) |
403 | if (!substream->oss.oss) | 403 | if (!substream->oss.oss) |
404 | #endif | 404 | #endif |
405 | if (atomic_read(&substream->mmap_count)) | 405 | if (atomic_read(&substream->mmap_count)) |
@@ -954,7 +954,7 @@ static struct action_ops snd_pcm_action_stop = { | |||
954 | * | 954 | * |
955 | * The state of each stream is then changed to the given state unconditionally. | 955 | * The state of each stream is then changed to the given state unconditionally. |
956 | * | 956 | * |
957 | * Return: Zero if succesful, or a negative error code. | 957 | * Return: Zero if successful, or a negative error code. |
958 | */ | 958 | */ |
959 | int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t state) | 959 | int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t state) |
960 | { | 960 | { |
@@ -1541,7 +1541,8 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream, | |||
1541 | if (substream->runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) | 1541 | if (substream->runtime->status->state == SNDRV_PCM_STATE_SUSPENDED) |
1542 | result = -ESTRPIPE; | 1542 | result = -ESTRPIPE; |
1543 | else { | 1543 | else { |
1544 | snd_printd("playback drain error (DMA or IRQ trouble?)\n"); | 1544 | dev_dbg(substream->pcm->card->dev, |
1545 | "playback drain error (DMA or IRQ trouble?)\n"); | ||
1545 | snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP); | 1546 | snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP); |
1546 | result = -EIO; | 1547 | result = -EIO; |
1547 | } | 1548 | } |
@@ -2066,7 +2067,7 @@ int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, | |||
2066 | 2067 | ||
2067 | err = snd_pcm_hw_constraints_init(substream); | 2068 | err = snd_pcm_hw_constraints_init(substream); |
2068 | if (err < 0) { | 2069 | if (err < 0) { |
2069 | snd_printd("snd_pcm_hw_constraints_init failed\n"); | 2070 | pcm_dbg(pcm, "snd_pcm_hw_constraints_init failed\n"); |
2070 | goto error; | 2071 | goto error; |
2071 | } | 2072 | } |
2072 | 2073 | ||
@@ -2077,7 +2078,7 @@ int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, | |||
2077 | 2078 | ||
2078 | err = snd_pcm_hw_constraints_complete(substream); | 2079 | err = snd_pcm_hw_constraints_complete(substream); |
2079 | if (err < 0) { | 2080 | if (err < 0) { |
2080 | snd_printd("snd_pcm_hw_constraints_complete failed\n"); | 2081 | pcm_dbg(pcm, "snd_pcm_hw_constraints_complete failed\n"); |
2081 | goto error; | 2082 | goto error; |
2082 | } | 2083 | } |
2083 | 2084 | ||
@@ -2609,7 +2610,7 @@ static int snd_pcm_common_ioctl1(struct file *file, | |||
2609 | return res; | 2610 | return res; |
2610 | } | 2611 | } |
2611 | } | 2612 | } |
2612 | snd_printd("unknown ioctl = 0x%x\n", cmd); | 2613 | pcm_dbg(substream->pcm, "unknown ioctl = 0x%x\n", cmd); |
2613 | return -ENOTTY; | 2614 | return -ENOTTY; |
2614 | } | 2615 | } |
2615 | 2616 | ||