hpicmn.c (3285ea10e9b09d68da18d2f805980246ec53523a) hpicmn.c (ffdb57874643a8ad65a46a02dceb2211283816c2)
1/******************************************************************************
2
3 AudioScience HPI driver
4 Copyright (C) 1997-2010 AudioScience Inc. <support@audioscience.com>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of version 2 of the GNU General Public License as
8 published by the Free Software Foundation;

--- 183 unchanged lines hidden (view full) ---

192 HPI_DEBUG_LOG(DEBUG, "check %d controls\n",
193 pC->control_count);
194 for (i = 0; i < pC->control_count; i++) {
195 struct hpi_control_cache_info *info =
196 (struct hpi_control_cache_info *)
197 &p_master_cache[byte_count];
198
199 if (!info->size_in32bit_words) {
1/******************************************************************************
2
3 AudioScience HPI driver
4 Copyright (C) 1997-2010 AudioScience Inc. <support@audioscience.com>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of version 2 of the GNU General Public License as
8 published by the Free Software Foundation;

--- 183 unchanged lines hidden (view full) ---

192 HPI_DEBUG_LOG(DEBUG, "check %d controls\n",
193 pC->control_count);
194 for (i = 0; i < pC->control_count; i++) {
195 struct hpi_control_cache_info *info =
196 (struct hpi_control_cache_info *)
197 &p_master_cache[byte_count];
198
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
201 corrupted. Minimum valid entry size is
202 sizeof(struct hpi_control_cache_info) */
203 HPI_DEBUG_LOG(ERROR,
206 /* ? This is a severe error, the cache is probably
207 corrupted. Minimum valid entry size is
208 sizeof(struct hpi_control_cache_info) */
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;
206 }
207
208 if (info->control_type) {
209 pC->p_info[info->control_index] = info;
210 cached++;
211 } else /* dummy cache entry */
212 pC->p_info[info->control_index] = NULL;

--- 13 unchanged lines hidden (view full) ---

226 break;
227 /* have seen last control index */
228 if (info->control_index == pC->control_count - 1)
229 break;
230 }
231
232 if (byte_count != pC->cache_size_in_bytes)
233 HPI_DEBUG_LOG(WARNING,
212 break;
213 }
214
215 if (info->control_type) {
216 pC->p_info[info->control_index] = info;
217 cached++;
218 } else /* dummy cache entry */
219 pC->p_info[info->control_index] = NULL;

--- 13 unchanged lines hidden (view full) ---

233 break;
234 /* have seen last control index */
235 if (info->control_index == pC->control_count - 1)
236 break;
237 }
238
239 if (byte_count != pC->cache_size_in_bytes)
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);
236 else
237 HPI_DEBUG_LOG(DEBUG,
243 pC->cache_size_in_bytes);
244 else
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
241 pC->init = cached;
242 }
243 return pC->init;
244}
245
246/** Find a control.
247*/

--- 432 unchanged lines hidden ---
248
249 pC->init = cached;
250 }
251 return pC->init;
252}
253
254/** Find a control.
255*/

--- 432 unchanged lines hidden ---