diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 11:23:57 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:28 -0500 |
commit | f58e2fcedb44b917cdd4da94f85a81c0bc3d3ef2 (patch) | |
tree | 75f79babb0b1ddaacfb11cce76936e2140cdda84 /sound/pci/lola/lola_pcm.c | |
parent | 6dfb5aff7d922ba7ce2f4155c55a921c7ee45e7d (diff) |
ALSA: lola: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/lola/lola_pcm.c')
-rw-r--r-- | sound/pci/lola/lola_pcm.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sound/pci/lola/lola_pcm.c b/sound/pci/lola/lola_pcm.c index 5ea85e8b83ab..3bd6985430e8 100644 --- a/sound/pci/lola/lola_pcm.c +++ b/sound/pci/lola/lola_pcm.c | |||
@@ -103,7 +103,7 @@ static void wait_for_srst_clear(struct lola *chip, struct lola_stream *str) | |||
103 | return; | 103 | return; |
104 | msleep(1); | 104 | msleep(1); |
105 | } | 105 | } |
106 | printk(KERN_WARNING SFX "SRST not clear (stream %d)\n", str->dsd); | 106 | dev_warn(chip->card->dev, "SRST not clear (stream %d)\n", str->dsd); |
107 | } | 107 | } |
108 | 108 | ||
109 | static int lola_stream_wait_for_fifo(struct lola *chip, | 109 | static int lola_stream_wait_for_fifo(struct lola *chip, |
@@ -118,7 +118,7 @@ static int lola_stream_wait_for_fifo(struct lola *chip, | |||
118 | return 0; | 118 | return 0; |
119 | msleep(1); | 119 | msleep(1); |
120 | } | 120 | } |
121 | printk(KERN_WARNING SFX "FIFO not ready (stream %d)\n", str->dsd); | 121 | dev_warn(chip->card->dev, "FIFO not ready (stream %d)\n", str->dsd); |
122 | return -EIO; | 122 | return -EIO; |
123 | } | 123 | } |
124 | 124 | ||
@@ -156,7 +156,7 @@ static int lola_sync_wait_for_fifo(struct lola *chip, | |||
156 | return 0; | 156 | return 0; |
157 | msleep(1); | 157 | msleep(1); |
158 | } | 158 | } |
159 | printk(KERN_WARNING SFX "FIFO not ready (pending %d)\n", pending - 1); | 159 | dev_warn(chip->card->dev, "FIFO not ready (pending %d)\n", pending - 1); |
160 | return -EIO; | 160 | return -EIO; |
161 | } | 161 | } |
162 | 162 | ||
@@ -373,7 +373,7 @@ static int lola_setup_periods(struct lola *chip, struct lola_pcm *pcm, | |||
373 | return 0; | 373 | return 0; |
374 | 374 | ||
375 | error: | 375 | error: |
376 | snd_printk(KERN_ERR SFX "Too many BDL entries: buffer=%d, period=%d\n", | 376 | dev_err(chip->card->dev, "Too many BDL entries: buffer=%d, period=%d\n", |
377 | str->bufsize, period_bytes); | 377 | str->bufsize, period_bytes); |
378 | return -EINVAL; | 378 | return -EINVAL; |
379 | } | 379 | } |
@@ -415,7 +415,7 @@ static int lola_set_stream_config(struct lola *chip, | |||
415 | err = lola_codec_read(chip, str->nid, LOLA_VERB_SET_STREAM_FORMAT, | 415 | err = lola_codec_read(chip, str->nid, LOLA_VERB_SET_STREAM_FORMAT, |
416 | str->format_verb, 0, &val, NULL); | 416 | str->format_verb, 0, &val, NULL); |
417 | if (err < 0) { | 417 | if (err < 0) { |
418 | printk(KERN_ERR SFX "Cannot set stream format 0x%x\n", | 418 | dev_err(chip->card->dev, "Cannot set stream format 0x%x\n", |
419 | str->format_verb); | 419 | str->format_verb); |
420 | return err; | 420 | return err; |
421 | } | 421 | } |
@@ -427,7 +427,8 @@ static int lola_set_stream_config(struct lola *chip, | |||
427 | LOLA_VERB_SET_CHANNEL_STREAMID, 0, verb, | 427 | LOLA_VERB_SET_CHANNEL_STREAMID, 0, verb, |
428 | &val, NULL); | 428 | &val, NULL); |
429 | if (err < 0) { | 429 | if (err < 0) { |
430 | printk(KERN_ERR SFX "Cannot set stream channel %d\n", i); | 430 | dev_err(chip->card->dev, |
431 | "Cannot set stream channel %d\n", i); | ||
431 | return err; | 432 | return err; |
432 | } | 433 | } |
433 | } | 434 | } |
@@ -651,13 +652,14 @@ static int lola_init_stream(struct lola *chip, struct lola_stream *str, | |||
651 | str->dsd += MAX_STREAM_IN_COUNT; | 652 | str->dsd += MAX_STREAM_IN_COUNT; |
652 | err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); | 653 | err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); |
653 | if (err < 0) { | 654 | if (err < 0) { |
654 | printk(KERN_ERR SFX "Can't read wcaps for 0x%x\n", nid); | 655 | dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid); |
655 | return err; | 656 | return err; |
656 | } | 657 | } |
657 | if (dir == PLAY) { | 658 | if (dir == PLAY) { |
658 | /* test TYPE and bits 0..11 (no test bit9 : Digital = 0/1) */ | 659 | /* test TYPE and bits 0..11 (no test bit9 : Digital = 0/1) */ |
659 | if ((val & 0x00f00dff) != 0x00000010) { | 660 | if ((val & 0x00f00dff) != 0x00000010) { |
660 | printk(KERN_ERR SFX "Invalid wcaps 0x%x for 0x%x\n", | 661 | dev_err(chip->card->dev, |
662 | "Invalid wcaps 0x%x for 0x%x\n", | ||
661 | val, nid); | 663 | val, nid); |
662 | return -EINVAL; | 664 | return -EINVAL; |
663 | } | 665 | } |
@@ -666,7 +668,8 @@ static int lola_init_stream(struct lola *chip, struct lola_stream *str, | |||
666 | * (bug : ignore bit8: Conn list = 0/1) | 668 | * (bug : ignore bit8: Conn list = 0/1) |
667 | */ | 669 | */ |
668 | if ((val & 0x00f00cff) != 0x00100010) { | 670 | if ((val & 0x00f00cff) != 0x00100010) { |
669 | printk(KERN_ERR SFX "Invalid wcaps 0x%x for 0x%x\n", | 671 | dev_err(chip->card->dev, |
672 | "Invalid wcaps 0x%x for 0x%x\n", | ||
670 | val, nid); | 673 | val, nid); |
671 | return -EINVAL; | 674 | return -EINVAL; |
672 | } | 675 | } |
@@ -677,14 +680,15 @@ static int lola_init_stream(struct lola *chip, struct lola_stream *str, | |||
677 | 680 | ||
678 | err = lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); | 681 | err = lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); |
679 | if (err < 0) { | 682 | if (err < 0) { |
680 | printk(KERN_ERR SFX "Can't read FORMATS 0x%x\n", nid); | 683 | dev_err(chip->card->dev, "Can't read FORMATS 0x%x\n", nid); |
681 | return err; | 684 | return err; |
682 | } | 685 | } |
683 | val &= 3; | 686 | val &= 3; |
684 | if (val == 3) | 687 | if (val == 3) |
685 | str->can_float = true; | 688 | str->can_float = true; |
686 | if (!(val & 1)) { | 689 | if (!(val & 1)) { |
687 | printk(KERN_ERR SFX "Invalid formats 0x%x for 0x%x", val, nid); | 690 | dev_err(chip->card->dev, |
691 | "Invalid formats 0x%x for 0x%x", val, nid); | ||
688 | return -EINVAL; | 692 | return -EINVAL; |
689 | } | 693 | } |
690 | return 0; | 694 | return 0; |