Commit ffdb57874643a8ad65a46a02dceb2211283816c2

Authored by Eliot Blennerhassett
Committed by Takashi Iwai
1 parent e64b1a28c5

ALSA: asihpi - Add adapter index to cache info for debug.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Showing 4 changed files with 20 additions and 5 deletions Side-by-side Diff

sound/pci/asihpi/hpi6000.c
... ... @@ -582,6 +582,9 @@
582 582 pao->adapter_type, pao->index);
583 583 pao->open = 0; /* upon creation the adapter is closed */
584 584  
  585 + if (phw->p_cache)
  586 + phw->p_cache->adap_idx = pao->index;
  587 +
585 588 return hpi_add_adapter(pao);
586 589 }
587 590  
sound/pci/asihpi/hpi6205.c
... ... @@ -718,6 +718,9 @@
718 718  
719 719 pao->open = 0; /* upon creation the adapter is closed */
720 720  
  721 + if (phw->p_cache)
  722 + phw->p_cache->adap_idx = pao->index;
  723 +
721 724 HPI_DEBUG_LOG(INFO, "bootload DSP OK\n");
722 725  
723 726 return hpi_add_adapter(pao);
sound/pci/asihpi/hpicmn.c
... ... @@ -197,11 +197,18 @@
197 197 &p_master_cache[byte_count];
198 198  
199 199 if (!info->size_in32bit_words) {
  200 + if (i == 0) {
  201 + HPI_DEBUG_LOG(INFO,
  202 + "adap %d cache not ready?\n",
  203 + pC->adap_idx);
  204 + return 0;
  205 + }
200 206 /* ? This is a severe error, the cache is probably
201 207 corrupted. Minimum valid entry size is
202 208 sizeof(struct hpi_control_cache_info) */
203 209 HPI_DEBUG_LOG(ERROR,
204   - "zero size cache entry %d\n", i);
  210 + "adap %d zero size cache entry %d\n",
  211 + pC->adap_idx, i);
205 212 break;
206 213 }
207 214  
208 215  
... ... @@ -231,12 +238,13 @@
231 238  
232 239 if (byte_count != pC->cache_size_in_bytes)
233 240 HPI_DEBUG_LOG(WARNING,
234   - "bytecount %d != cache size %d", byte_count,
  241 + "adap %d bytecount %d != cache size %d",
  242 + pC->adap_idx, byte_count,
235 243 pC->cache_size_in_bytes);
236 244 else
237 245 HPI_DEBUG_LOG(DEBUG,
238   - "cache good. bytecount == cache size = %d",
239   - byte_count);
  246 + "adap %d cache good, bytecount == cache size = %d",
  247 + pC->adap_idx, byte_count);
240 248  
241 249 pC->init = cached;
242 250 }
sound/pci/asihpi/hpicmn.h
... ... @@ -33,8 +33,9 @@
33 33 };
34 34  
35 35 struct hpi_control_cache {
36   - u32 init; /**< indicates whether the
  36 + u16 init; /**< indicates whether the
37 37 structures are initialized */
  38 + u16 adap_idx;
38 39 u32 control_count;
39 40 u32 cache_size_in_bytes;
40 41 struct hpi_control_cache_info