aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/lola
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-25 11:23:57 -0500
committerTakashi Iwai <tiwai@suse.de>2014-02-26 10:45:28 -0500
commitf58e2fcedb44b917cdd4da94f85a81c0bc3d3ef2 (patch)
tree75f79babb0b1ddaacfb11cce76936e2140cdda84 /sound/pci/lola
parent6dfb5aff7d922ba7ce2f4155c55a921c7ee45e7d (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')
-rw-r--r--sound/pci/lola/lola.c42
-rw-r--r--sound/pci/lola/lola_clock.c14
-rw-r--r--sound/pci/lola/lola_mixer.c22
-rw-r--r--sound/pci/lola/lola_pcm.c26
4 files changed, 55 insertions, 49 deletions
diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c
index 56d4f94daea2..d63434d8c3fb 100644
--- a/sound/pci/lola/lola.c
+++ b/sound/pci/lola/lola.c
@@ -75,7 +75,7 @@ MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
75static int debug; 75static int debug;
76module_param(debug, int, 0644); 76module_param(debug, int, 0644);
77#define verbose_debug(fmt, args...) \ 77#define verbose_debug(fmt, args...) \
78 do { if (debug > 1) printk(KERN_DEBUG SFX fmt, ##args); } while (0) 78 do { if (debug > 1) pr_debug(SFX fmt, ##args); } while (0)
79#else 79#else
80#define verbose_debug(fmt, args...) 80#define verbose_debug(fmt, args...)
81#endif 81#endif
@@ -168,7 +168,7 @@ static int rirb_get_response(struct lola *chip, unsigned int *val,
168 verbose_debug("get_response: %x, %x\n", 168 verbose_debug("get_response: %x, %x\n",
169 chip->res, chip->res_ex); 169 chip->res, chip->res_ex);
170 if (chip->res_ex & LOLA_RIRB_EX_ERROR) { 170 if (chip->res_ex & LOLA_RIRB_EX_ERROR) {
171 printk(KERN_WARNING SFX "RIRB ERROR: " 171 dev_warn(chip->card->dev, "RIRB ERROR: "
172 "NID=%x, verb=%x, data=%x, ext=%x\n", 172 "NID=%x, verb=%x, data=%x, ext=%x\n",
173 chip->last_cmd_nid, 173 chip->last_cmd_nid,
174 chip->last_verb, chip->last_data, 174 chip->last_verb, chip->last_data,
@@ -182,9 +182,9 @@ static int rirb_get_response(struct lola *chip, unsigned int *val,
182 udelay(20); 182 udelay(20);
183 cond_resched(); 183 cond_resched();
184 } 184 }
185 printk(KERN_WARNING SFX "RIRB response error\n"); 185 dev_warn(chip->card->dev, "RIRB response error\n");
186 if (!chip->polling_mode) { 186 if (!chip->polling_mode) {
187 printk(KERN_WARNING SFX "switching to polling mode\n"); 187 dev_warn(chip->card->dev, "switching to polling mode\n");
188 chip->polling_mode = 1; 188 chip->polling_mode = 1;
189 goto again; 189 goto again;
190 } 190 }
@@ -327,7 +327,7 @@ static int reset_controller(struct lola *chip)
327 break; 327 break;
328 } while (time_before(jiffies, end_time)); 328 } while (time_before(jiffies, end_time));
329 if (!gctl) { 329 if (!gctl) {
330 printk(KERN_ERR SFX "cannot reset controller\n"); 330 dev_err(chip->card->dev, "cannot reset controller\n");
331 return -EIO; 331 return -EIO;
332 } 332 }
333 return 0; 333 return 0;
@@ -452,40 +452,40 @@ static int lola_parse_tree(struct lola *chip)
452 452
453 err = lola_read_param(chip, 0, LOLA_PAR_VENDOR_ID, &val); 453 err = lola_read_param(chip, 0, LOLA_PAR_VENDOR_ID, &val);
454 if (err < 0) { 454 if (err < 0) {
455 printk(KERN_ERR SFX "Can't read VENDOR_ID\n"); 455 dev_err(chip->card->dev, "Can't read VENDOR_ID\n");
456 return err; 456 return err;
457 } 457 }
458 val >>= 16; 458 val >>= 16;
459 if (val != 0x1369) { 459 if (val != 0x1369) {
460 printk(KERN_ERR SFX "Unknown codec vendor 0x%x\n", val); 460 dev_err(chip->card->dev, "Unknown codec vendor 0x%x\n", val);
461 return -EINVAL; 461 return -EINVAL;
462 } 462 }
463 463
464 err = lola_read_param(chip, 1, LOLA_PAR_FUNCTION_TYPE, &val); 464 err = lola_read_param(chip, 1, LOLA_PAR_FUNCTION_TYPE, &val);
465 if (err < 0) { 465 if (err < 0) {
466 printk(KERN_ERR SFX "Can't read FUNCTION_TYPE\n"); 466 dev_err(chip->card->dev, "Can't read FUNCTION_TYPE\n");
467 return err; 467 return err;
468 } 468 }
469 if (val != 1) { 469 if (val != 1) {
470 printk(KERN_ERR SFX "Unknown function type %d\n", val); 470 dev_err(chip->card->dev, "Unknown function type %d\n", val);
471 return -EINVAL; 471 return -EINVAL;
472 } 472 }
473 473
474 err = lola_read_param(chip, 1, LOLA_PAR_SPECIFIC_CAPS, &val); 474 err = lola_read_param(chip, 1, LOLA_PAR_SPECIFIC_CAPS, &val);
475 if (err < 0) { 475 if (err < 0) {
476 printk(KERN_ERR SFX "Can't read SPECCAPS\n"); 476 dev_err(chip->card->dev, "Can't read SPECCAPS\n");
477 return err; 477 return err;
478 } 478 }
479 chip->lola_caps = val; 479 chip->lola_caps = val;
480 chip->pin[CAPT].num_pins = LOLA_AFG_INPUT_PIN_COUNT(chip->lola_caps); 480 chip->pin[CAPT].num_pins = LOLA_AFG_INPUT_PIN_COUNT(chip->lola_caps);
481 chip->pin[PLAY].num_pins = LOLA_AFG_OUTPUT_PIN_COUNT(chip->lola_caps); 481 chip->pin[PLAY].num_pins = LOLA_AFG_OUTPUT_PIN_COUNT(chip->lola_caps);
482 snd_printdd(SFX "speccaps=0x%x, pins in=%d, out=%d\n", 482 dev_dbg(chip->card->dev, "speccaps=0x%x, pins in=%d, out=%d\n",
483 chip->lola_caps, 483 chip->lola_caps,
484 chip->pin[CAPT].num_pins, chip->pin[PLAY].num_pins); 484 chip->pin[CAPT].num_pins, chip->pin[PLAY].num_pins);
485 485
486 if (chip->pin[CAPT].num_pins > MAX_AUDIO_INOUT_COUNT || 486 if (chip->pin[CAPT].num_pins > MAX_AUDIO_INOUT_COUNT ||
487 chip->pin[PLAY].num_pins > MAX_AUDIO_INOUT_COUNT) { 487 chip->pin[PLAY].num_pins > MAX_AUDIO_INOUT_COUNT) {
488 printk(KERN_ERR SFX "Invalid Lola-spec caps 0x%x\n", val); 488 dev_err(chip->card->dev, "Invalid Lola-spec caps 0x%x\n", val);
489 return -EINVAL; 489 return -EINVAL;
490 } 490 }
491 491
@@ -586,7 +586,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
586 586
587 chip = kzalloc(sizeof(*chip), GFP_KERNEL); 587 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
588 if (!chip) { 588 if (!chip) {
589 snd_printk(KERN_ERR SFX "cannot allocate chip\n"); 589 dev_err(chip->card->dev, "cannot allocate chip\n");
590 pci_disable_device(pci); 590 pci_disable_device(pci);
591 return -ENOMEM; 591 return -ENOMEM;
592 } 592 }
@@ -609,7 +609,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
609 chip->sample_rate_max = 192000; 609 chip->sample_rate_max = 192000;
610 break; 610 break;
611 default: 611 default:
612 snd_printk(KERN_WARNING SFX 612 dev_warn(chip->card->dev,
613 "Invalid granularity %d, reset to %d\n", 613 "Invalid granularity %d, reset to %d\n",
614 chip->granularity, LOLA_GRANULARITY_MAX); 614 chip->granularity, LOLA_GRANULARITY_MAX);
615 chip->granularity = LOLA_GRANULARITY_MAX; 615 chip->granularity = LOLA_GRANULARITY_MAX;
@@ -618,7 +618,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
618 } 618 }
619 chip->sample_rate_min = sample_rate_min[dev]; 619 chip->sample_rate_min = sample_rate_min[dev];
620 if (chip->sample_rate_min > chip->sample_rate_max) { 620 if (chip->sample_rate_min > chip->sample_rate_max) {
621 snd_printk(KERN_WARNING SFX 621 dev_warn(chip->card->dev,
622 "Invalid sample_rate_min %d, reset to 16000\n", 622 "Invalid sample_rate_min %d, reset to 16000\n",
623 chip->sample_rate_min); 623 chip->sample_rate_min);
624 chip->sample_rate_min = 16000; 624 chip->sample_rate_min = 16000;
@@ -636,7 +636,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
636 chip->bar[1].addr = pci_resource_start(pci, 2); 636 chip->bar[1].addr = pci_resource_start(pci, 2);
637 chip->bar[1].remap_addr = pci_ioremap_bar(pci, 2); 637 chip->bar[1].remap_addr = pci_ioremap_bar(pci, 2);
638 if (!chip->bar[0].remap_addr || !chip->bar[1].remap_addr) { 638 if (!chip->bar[0].remap_addr || !chip->bar[1].remap_addr) {
639 snd_printk(KERN_ERR SFX "ioremap error\n"); 639 dev_err(chip->card->dev, "ioremap error\n");
640 err = -ENXIO; 640 err = -ENXIO;
641 goto errout; 641 goto errout;
642 } 642 }
@@ -649,7 +649,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
649 649
650 if (request_irq(pci->irq, lola_interrupt, IRQF_SHARED, 650 if (request_irq(pci->irq, lola_interrupt, IRQF_SHARED,
651 KBUILD_MODNAME, chip)) { 651 KBUILD_MODNAME, chip)) {
652 printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq); 652 dev_err(chip->card->dev, "unable to grab IRQ %d\n", pci->irq);
653 err = -EBUSY; 653 err = -EBUSY;
654 goto errout; 654 goto errout;
655 } 655 }
@@ -660,7 +660,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
660 chip->pcm[CAPT].num_streams = (dever >> 0) & 0x3ff; 660 chip->pcm[CAPT].num_streams = (dever >> 0) & 0x3ff;
661 chip->pcm[PLAY].num_streams = (dever >> 10) & 0x3ff; 661 chip->pcm[PLAY].num_streams = (dever >> 10) & 0x3ff;
662 chip->version = (dever >> 24) & 0xff; 662 chip->version = (dever >> 24) & 0xff;
663 snd_printdd(SFX "streams in=%d, out=%d, version=0x%x\n", 663 dev_dbg(chip->card->dev, "streams in=%d, out=%d, version=0x%x\n",
664 chip->pcm[CAPT].num_streams, chip->pcm[PLAY].num_streams, 664 chip->pcm[CAPT].num_streams, chip->pcm[PLAY].num_streams,
665 chip->version); 665 chip->version);
666 666
@@ -669,7 +669,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
669 chip->pcm[PLAY].num_streams > MAX_STREAM_OUT_COUNT || 669 chip->pcm[PLAY].num_streams > MAX_STREAM_OUT_COUNT ||
670 (!chip->pcm[CAPT].num_streams && 670 (!chip->pcm[CAPT].num_streams &&
671 !chip->pcm[PLAY].num_streams)) { 671 !chip->pcm[PLAY].num_streams)) {
672 printk(KERN_ERR SFX "invalid DEVER = %x\n", dever); 672 dev_err(chip->card->dev, "invalid DEVER = %x\n", dever);
673 err = -EINVAL; 673 err = -EINVAL;
674 goto errout; 674 goto errout;
675 } 675 }
@@ -680,7 +680,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
680 680
681 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); 681 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
682 if (err < 0) { 682 if (err < 0) {
683 snd_printk(KERN_ERR SFX "Error creating device [card]!\n"); 683 dev_err(chip->card->dev, "Error creating device [card]!\n");
684 goto errout; 684 goto errout;
685 } 685 }
686 686
@@ -720,7 +720,7 @@ static int lola_probe(struct pci_dev *pci,
720 err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, 720 err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
721 0, &card); 721 0, &card);
722 if (err < 0) { 722 if (err < 0) {
723 snd_printk(KERN_ERR SFX "Error creating card!\n"); 723 dev_err(card->dev, "Error creating card!\n");
724 return err; 724 return err;
725 } 725 }
726 726
diff --git a/sound/pci/lola/lola_clock.c b/sound/pci/lola/lola_clock.c
index eb1d6b97df16..2bef6b412aee 100644
--- a/sound/pci/lola/lola_clock.c
+++ b/sound/pci/lola/lola_clock.c
@@ -128,21 +128,21 @@ int lola_init_clock_widget(struct lola *chip, int nid)
128 128
129 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); 129 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val);
130 if (err < 0) { 130 if (err < 0) {
131 printk(KERN_ERR SFX "Can't read wcaps for 0x%x\n", nid); 131 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid);
132 return err; 132 return err;
133 } 133 }
134 134
135 if ((val & 0xfff00000) != 0x01f00000) { /* test SubType and Type */ 135 if ((val & 0xfff00000) != 0x01f00000) { /* test SubType and Type */
136 snd_printdd("No valid clock widget\n"); 136 dev_dbg(chip->card->dev, "No valid clock widget\n");
137 return 0; 137 return 0;
138 } 138 }
139 139
140 chip->clock.nid = nid; 140 chip->clock.nid = nid;
141 chip->clock.items = val & 0xff; 141 chip->clock.items = val & 0xff;
142 snd_printdd("clock_list nid=%x, entries=%d\n", nid, 142 dev_dbg(chip->card->dev, "clock_list nid=%x, entries=%d\n", nid,
143 chip->clock.items); 143 chip->clock.items);
144 if (chip->clock.items > MAX_SAMPLE_CLOCK_COUNT) { 144 if (chip->clock.items > MAX_SAMPLE_CLOCK_COUNT) {
145 printk(KERN_ERR SFX "CLOCK_LIST too big: %d\n", 145 dev_err(chip->card->dev, "CLOCK_LIST too big: %d\n",
146 chip->clock.items); 146 chip->clock.items);
147 return -EINVAL; 147 return -EINVAL;
148 } 148 }
@@ -158,7 +158,7 @@ int lola_init_clock_widget(struct lola *chip, int nid)
158 err = lola_codec_read(chip, nid, LOLA_VERB_GET_CLOCK_LIST, 158 err = lola_codec_read(chip, nid, LOLA_VERB_GET_CLOCK_LIST,
159 idx, 0, &val, &res_ex); 159 idx, 0, &val, &res_ex);
160 if (err < 0) { 160 if (err < 0) {
161 printk(KERN_ERR SFX "Can't read CLOCK_LIST\n"); 161 dev_err(chip->card->dev, "Can't read CLOCK_LIST\n");
162 return -EINVAL; 162 return -EINVAL;
163 } 163 }
164 164
@@ -223,7 +223,7 @@ int lola_enable_clock_events(struct lola *chip)
223 if (err < 0) 223 if (err < 0)
224 return err; 224 return err;
225 if (res) { 225 if (res) {
226 printk(KERN_WARNING SFX "error in enable_clock_events %d\n", 226 dev_warn(chip->card->dev, "error in enable_clock_events %d\n",
227 res); 227 res);
228 return -EINVAL; 228 return -EINVAL;
229 } 229 }
@@ -242,7 +242,7 @@ int lola_set_clock_index(struct lola *chip, unsigned int idx)
242 if (err < 0) 242 if (err < 0)
243 return err; 243 return err;
244 if (res) { 244 if (res) {
245 printk(KERN_WARNING SFX "error in set_clock %d\n", res); 245 dev_warn(chip->card->dev, "error in set_clock %d\n", res);
246 return -EINVAL; 246 return -EINVAL;
247 } 247 }
248 return 0; 248 return 0;
diff --git a/sound/pci/lola/lola_mixer.c b/sound/pci/lola/lola_mixer.c
index 52c8d6b0f39b..782f4d8299ae 100644
--- a/sound/pci/lola/lola_mixer.c
+++ b/sound/pci/lola/lola_mixer.c
@@ -37,7 +37,7 @@ static int lola_init_pin(struct lola *chip, struct lola_pin *pin,
37 pin->nid = nid; 37 pin->nid = nid;
38 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); 38 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val);
39 if (err < 0) { 39 if (err < 0) {
40 printk(KERN_ERR SFX "Can't read wcaps for 0x%x\n", nid); 40 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid);
41 return err; 41 return err;
42 } 42 }
43 val &= 0x00f00fff; /* test TYPE and bits 0..11 */ 43 val &= 0x00f00fff; /* test TYPE and bits 0..11 */
@@ -48,7 +48,7 @@ static int lola_init_pin(struct lola *chip, struct lola_pin *pin,
48 else if (val == 0x0040000c && dir == PLAY) /* Dig=0, OutAmp/ovrd */ 48 else if (val == 0x0040000c && dir == PLAY) /* Dig=0, OutAmp/ovrd */
49 pin->is_analog = true; 49 pin->is_analog = true;
50 else { 50 else {
51 printk(KERN_ERR SFX "Invalid wcaps 0x%x for 0x%x\n", val, nid); 51 dev_err(chip->card->dev, "Invalid wcaps 0x%x for 0x%x\n", val, nid);
52 return -EINVAL; 52 return -EINVAL;
53 } 53 }
54 54
@@ -62,7 +62,7 @@ static int lola_init_pin(struct lola *chip, struct lola_pin *pin,
62 else 62 else
63 err = lola_read_param(chip, nid, LOLA_PAR_AMP_IN_CAP, &val); 63 err = lola_read_param(chip, nid, LOLA_PAR_AMP_IN_CAP, &val);
64 if (err < 0) { 64 if (err < 0) {
65 printk(KERN_ERR SFX "Can't read AMP-caps for 0x%x\n", nid); 65 dev_err(chip->card->dev, "Can't read AMP-caps for 0x%x\n", nid);
66 return err; 66 return err;
67 } 67 }
68 68
@@ -79,7 +79,7 @@ static int lola_init_pin(struct lola *chip, struct lola_pin *pin,
79 err = lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val, 79 err = lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val,
80 NULL); 80 NULL);
81 if (err < 0) { 81 if (err < 0) {
82 printk(KERN_ERR SFX "Can't get MAX_LEVEL 0x%x\n", nid); 82 dev_err(chip->card->dev, "Can't get MAX_LEVEL 0x%x\n", nid);
83 return err; 83 return err;
84 } 84 }
85 pin->max_level = val & 0x3ff; /* 10 bits */ 85 pin->max_level = val & 0x3ff; /* 10 bits */
@@ -119,12 +119,12 @@ int lola_init_mixer_widget(struct lola *chip, int nid)
119 119
120 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); 120 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val);
121 if (err < 0) { 121 if (err < 0) {
122 printk(KERN_ERR SFX "Can't read wcaps for 0x%x\n", nid); 122 dev_err(chip->card->dev, "Can't read wcaps for 0x%x\n", nid);
123 return err; 123 return err;
124 } 124 }
125 125
126 if ((val & 0xfff00000) != 0x02f00000) { /* test SubType and Type */ 126 if ((val & 0xfff00000) != 0x02f00000) { /* test SubType and Type */
127 snd_printdd("No valid mixer widget\n"); 127 dev_dbg(chip->card->dev, "No valid mixer widget\n");
128 return 0; 128 return 0;
129 } 129 }
130 130
@@ -202,7 +202,7 @@ int lola_init_mixer_widget(struct lola *chip, int nid)
202 */ 202 */
203 if (chip->mixer.src_stream_out_ofs > MAX_AUDIO_INOUT_COUNT || 203 if (chip->mixer.src_stream_out_ofs > MAX_AUDIO_INOUT_COUNT ||
204 chip->mixer.dest_phys_out_ofs > MAX_STREAM_IN_COUNT) { 204 chip->mixer.dest_phys_out_ofs > MAX_STREAM_IN_COUNT) {
205 printk(KERN_ERR SFX "Invalid mixer widget size\n"); 205 dev_err(chip->card->dev, "Invalid mixer widget size\n");
206 return -EINVAL; 206 return -EINVAL;
207 } 207 }
208 208
@@ -213,7 +213,7 @@ int lola_init_mixer_widget(struct lola *chip, int nid)
213 (((1U << chip->mixer.dest_phys_outs) - 1) 213 (((1U << chip->mixer.dest_phys_outs) - 1)
214 << chip->mixer.dest_phys_out_ofs); 214 << chip->mixer.dest_phys_out_ofs);
215 215
216 snd_printdd("Mixer src_mask=%x, dest_mask=%x\n", 216 dev_dbg(chip->card->dev, "Mixer src_mask=%x, dest_mask=%x\n",
217 chip->mixer.src_mask, chip->mixer.dest_mask); 217 chip->mixer.src_mask, chip->mixer.dest_mask);
218 218
219 return 0; 219 return 0;
@@ -236,7 +236,8 @@ static int lola_mixer_set_src_gain(struct lola *chip, unsigned int id,
236 (gain == readw(&chip->mixer.array->src_gain[id]))) 236 (gain == readw(&chip->mixer.array->src_gain[id])))
237 return 0; 237 return 0;
238 238
239 snd_printdd("lola_mixer_set_src_gain (id=%d, gain=%d) enable=%x\n", 239 dev_dbg(chip->card->dev,
240 "lola_mixer_set_src_gain (id=%d, gain=%d) enable=%x\n",
240 id, gain, val); 241 id, gain, val);
241 writew(gain, &chip->mixer.array->src_gain[id]); 242 writew(gain, &chip->mixer.array->src_gain[id]);
242 writel(val, &chip->mixer.array->src_gain_enable); 243 writel(val, &chip->mixer.array->src_gain_enable);
@@ -409,7 +410,8 @@ static int set_analog_volume(struct lola *chip, int dir,
409 return 0; 410 return 0;
410 if (external_call) 411 if (external_call)
411 lola_codec_flush(chip); 412 lola_codec_flush(chip);
412 snd_printdd("set_analog_volume (dir=%d idx=%d, volume=%d)\n", 413 dev_dbg(chip->card->dev,
414 "set_analog_volume (dir=%d idx=%d, volume=%d)\n",
413 dir, idx, val); 415 dir, idx, val);
414 err = lola_codec_write(chip, pin->nid, 416 err = lola_codec_write(chip, pin->nid,
415 LOLA_VERB_SET_AMP_GAIN_MUTE, val, 0); 417 LOLA_VERB_SET_AMP_GAIN_MUTE, val, 0);
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
109static int lola_stream_wait_for_fifo(struct lola *chip, 109static 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;