aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-02-09 23:26:00 -0500
committerTakashi Iwai <tiwai@suse.de>2011-02-10 12:49:23 -0500
commitffdb57874643a8ad65a46a02dceb2211283816c2 (patch)
tree1e7e199de9514f80102791638052cb4b902b955e /sound/pci/asihpi
parente64b1a28c532009edd6a8a7b906c280fc2a4b90a (diff)
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>
Diffstat (limited to 'sound/pci/asihpi')
-rw-r--r--sound/pci/asihpi/hpi6000.c3
-rw-r--r--sound/pci/asihpi/hpi6205.c3
-rw-r--r--sound/pci/asihpi/hpicmn.c16
-rw-r--r--sound/pci/asihpi/hpicmn.h3
4 files changed, 20 insertions, 5 deletions
diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c
index c85db49e5ec5..c486af182227 100644
--- a/sound/pci/asihpi/hpi6000.c
+++ b/sound/pci/asihpi/hpi6000.c
@@ -582,6 +582,9 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao,
582 pao->adapter_type, pao->index); 582 pao->adapter_type, pao->index);
583 pao->open = 0; /* upon creation the adapter is closed */ 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 return hpi_add_adapter(pao); 588 return hpi_add_adapter(pao);
586} 589}
587 590
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c
index b740edc29b1c..5ebf8f886ad7 100644
--- a/sound/pci/asihpi/hpi6205.c
+++ b/sound/pci/asihpi/hpi6205.c
@@ -718,6 +718,9 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
718 718
719 pao->open = 0; /* upon creation the adapter is closed */ 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 HPI_DEBUG_LOG(INFO, "bootload DSP OK\n"); 724 HPI_DEBUG_LOG(INFO, "bootload DSP OK\n");
722 725
723 return hpi_add_adapter(pao); 726 return hpi_add_adapter(pao);
diff --git a/sound/pci/asihpi/hpicmn.c b/sound/pci/asihpi/hpicmn.c
index 793236ef0a54..85c297279792 100644
--- a/sound/pci/asihpi/hpicmn.c
+++ b/sound/pci/asihpi/hpicmn.c
@@ -197,11 +197,18 @@ static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
197 &p_master_cache[byte_count]; 197 &p_master_cache[byte_count];
198 198
199 if (!info->size_in32bit_words) { 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 /* ? This is a severe error, the cache is probably 206 /* ? This is a severe error, the cache is probably
201 corrupted. Minimum valid entry size is 207 corrupted. Minimum valid entry size is
202 sizeof(struct hpi_control_cache_info) */ 208 sizeof(struct hpi_control_cache_info) */
203 HPI_DEBUG_LOG(ERROR, 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 break; 212 break;
206 } 213 }
207 214
@@ -231,12 +238,13 @@ static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
231 238
232 if (byte_count != pC->cache_size_in_bytes) 239 if (byte_count != pC->cache_size_in_bytes)
233 HPI_DEBUG_LOG(WARNING, 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 pC->cache_size_in_bytes); 243 pC->cache_size_in_bytes);
236 else 244 else
237 HPI_DEBUG_LOG(DEBUG, 245 HPI_DEBUG_LOG(DEBUG,
238 "cache good. bytecount == cache size = %d", 246 "adap %d cache good, bytecount == cache size = %d",
239 byte_count); 247 pC->adap_idx, byte_count);
240 248
241 pC->init = cached; 249 pC->init = cached;
242 } 250 }
diff --git a/sound/pci/asihpi/hpicmn.h b/sound/pci/asihpi/hpicmn.h
index e2f6f1f11a66..2708c4df2c70 100644
--- a/sound/pci/asihpi/hpicmn.h
+++ b/sound/pci/asihpi/hpicmn.h
@@ -33,8 +33,9 @@ struct hpi_adapter_obj {
33}; 33};
34 34
35struct hpi_control_cache { 35struct hpi_control_cache {
36 u32 init; /**< indicates whether the 36 u16 init; /**< indicates whether the
37 structures are initialized */ 37 structures are initialized */
38 u16 adap_idx;
38 u32 control_count; 39 u32 control_count;
39 u32 cache_size_in_bytes; 40 u32 cache_size_in_bytes;
40 struct hpi_control_cache_info 41 struct hpi_control_cache_info