diff options
author | Eliot Blennerhassett <eliot@blennerhassett.gen.nz> | 2014-11-20 16:22:54 +1300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-22 22:33:25 +0100 |
commit | 5bc91f5b3c732bdb3b9e7cc8bd27969d25015bcd (patch) | |
tree | 807f71ed04784ecc3fe71e57106b8bb3004783fd /sound/pci/asihpi | |
parent | f9a376c3f6d77e59d41350901b2bafbaf8791df0 (diff) | |
download | linux-5bc91f5b3c732bdb3b9e7cc8bd27969d25015bcd.tar.gz linux-5bc91f5b3c732bdb3b9e7cc8bd27969d25015bcd.tar.bz2 linux-5bc91f5b3c732bdb3b9e7cc8bd27969d25015bcd.zip |
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/asihpi')
-rw-r--r-- | sound/pci/asihpi/hpimsgx.c | 15 |
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 @@ /****************************************************************************** AudioScience HPI driver - Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> + Copyright (C) 1997-2014 AudioScience Inc. <support@audioscience.com> This program is free software; you can redistribute it and/or modify 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[] = { static struct hpios_spinlock msgx_lock; static hpi_handler_func *hpi_entry_points[HPI_MAX_ADAPTERS]; +static int logging_enabled = 1; static hpi_handler_func *hpi_lookup_entry_point_function(const struct hpi_pci *pci_info) @@ -312,7 +313,9 @@ static void instream_message(struct hpi_message *phm, void hpi_send_recv_ex(struct hpi_message *phm, struct hpi_response *phr, void *h_owner) { - HPI_DEBUG_MESSAGE(DEBUG, phm); + + if (logging_enabled) + HPI_DEBUG_MESSAGE(DEBUG, phm); if (phm->type != HPI_TYPE_REQUEST) { 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, hw_entry_point(phm, phr); break; } - HPI_DEBUG_RESPONSE(phr); + if (logging_enabled) + HPI_DEBUG_RESPONSE(phr); + + if (phr->error >= HPI_ERROR_DSP_COMMUNICATION) { + hpi_debug_level_set(HPI_DEBUG_LEVEL_ERROR); + logging_enabled = 0; + } } static void adapter_open(struct hpi_message *phm, struct hpi_response *phr) |