aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorEliot Blennerhassett <eliot@blennerhassett.gen.nz>2014-11-19 22:22:54 -0500
committerTakashi Iwai <tiwai@suse.de>2014-11-22 16:33:25 -0500
commit5bc91f5b3c732bdb3b9e7cc8bd27969d25015bcd (patch)
tree807f71ed04784ecc3fe71e57106b8bb3004783fd /sound/pci
parentf9a376c3f6d77e59d41350901b2bafbaf8791df0 (diff)
ALSA: asihpi: Turn off msg/resp logging after DSP has crashed.
Prevents spewing of useless messages if app keeps trying to access the card. Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/asihpi/hpimsgx.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/pci/asihpi/hpimsgx.c b/sound/pci/asihpi/hpimsgx.c
index d4790ddc225c..736f45337fc7 100644
--- a/sound/pci/asihpi/hpimsgx.c
+++ b/sound/pci/asihpi/hpimsgx.c
@@ -1,7 +1,7 @@
1/****************************************************************************** 1/******************************************************************************
2 2
3 AudioScience HPI driver 3 AudioScience HPI driver
4 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 4 Copyright (C) 1997-2014 AudioScience Inc. <support@audioscience.com>
5 5
6 This program is free software; you can redistribute it and/or modify 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 7 it under the terms of version 2 of the GNU General Public License as
@@ -35,6 +35,7 @@ static struct pci_device_id asihpi_pci_tbl[] = {
35static struct hpios_spinlock msgx_lock; 35static struct hpios_spinlock msgx_lock;
36 36
37static hpi_handler_func *hpi_entry_points[HPI_MAX_ADAPTERS]; 37static hpi_handler_func *hpi_entry_points[HPI_MAX_ADAPTERS];
38static int logging_enabled = 1;
38 39
39static hpi_handler_func *hpi_lookup_entry_point_function(const struct hpi_pci 40static hpi_handler_func *hpi_lookup_entry_point_function(const struct hpi_pci
40 *pci_info) 41 *pci_info)
@@ -312,7 +313,9 @@ static void instream_message(struct hpi_message *phm,
312void hpi_send_recv_ex(struct hpi_message *phm, struct hpi_response *phr, 313void hpi_send_recv_ex(struct hpi_message *phm, struct hpi_response *phr,
313 void *h_owner) 314 void *h_owner)
314{ 315{
315 HPI_DEBUG_MESSAGE(DEBUG, phm); 316
317 if (logging_enabled)
318 HPI_DEBUG_MESSAGE(DEBUG, phm);
316 319
317 if (phm->type != HPI_TYPE_REQUEST) { 320 if (phm->type != HPI_TYPE_REQUEST) {
318 hpi_init_response(phr, phm->object, phm->function, 321 hpi_init_response(phr, phm->object, phm->function,
@@ -352,8 +355,14 @@ void hpi_send_recv_ex(struct hpi_message *phm, struct hpi_response *phr,
352 hw_entry_point(phm, phr); 355 hw_entry_point(phm, phr);
353 break; 356 break;
354 } 357 }
355 HPI_DEBUG_RESPONSE(phr);
356 358
359 if (logging_enabled)
360 HPI_DEBUG_RESPONSE(phr);
361
362 if (phr->error >= HPI_ERROR_DSP_COMMUNICATION) {
363 hpi_debug_level_set(HPI_DEBUG_LEVEL_ERROR);
364 logging_enabled = 0;
365 }
357} 366}
358 367
359static void adapter_open(struct hpi_message *phm, struct hpi_response *phr) 368static void adapter_open(struct hpi_message *phm, struct hpi_response *phr)