mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ALSA: asihpi - Switch to dev_printk.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
8121d91c02
commit
5ed15dafa3
1 changed files with 19 additions and 15 deletions
|
@ -71,47 +71,51 @@ short hpi_dsp_code_open(u32 adapter, struct dsp_code *ps_dsp_code,
|
|||
int err;
|
||||
|
||||
sprintf(fw_name, "asihpi/dsp%04x.bin", adapter);
|
||||
HPI_DEBUG_LOG(INFO, "requesting firmware for %s\n", fw_name);
|
||||
|
||||
err = request_firmware(&ps_firmware, fw_name,
|
||||
&ps_dsp_code->ps_dev->dev);
|
||||
|
||||
if (err != 0) {
|
||||
HPI_DEBUG_LOG(ERROR, "%d, request_firmware failed for %s\n",
|
||||
err, fw_name);
|
||||
dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev,
|
||||
"%d, request_firmware failed for %s\n", err,
|
||||
fw_name);
|
||||
goto error1;
|
||||
}
|
||||
if (ps_firmware->size < sizeof(header)) {
|
||||
HPI_DEBUG_LOG(ERROR, "header size too small %s\n", fw_name);
|
||||
dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev,
|
||||
"Header size too small %s\n", fw_name);
|
||||
goto error2;
|
||||
}
|
||||
memcpy(&header, ps_firmware->data, sizeof(header));
|
||||
if (header.adapter != adapter) {
|
||||
HPI_DEBUG_LOG(ERROR, "adapter type incorrect %4x != %4x\n",
|
||||
header.adapter, adapter);
|
||||
dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev,
|
||||
"Adapter type incorrect %4x != %4x\n", header.adapter,
|
||||
adapter);
|
||||
goto error2;
|
||||
}
|
||||
if (header.size != ps_firmware->size) {
|
||||
HPI_DEBUG_LOG(ERROR, "code size wrong %d != %ld\n",
|
||||
header.size, (unsigned long)ps_firmware->size);
|
||||
dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev,
|
||||
"Code size wrong %d != %ld\n", header.size,
|
||||
(unsigned long)ps_firmware->size);
|
||||
goto error2;
|
||||
}
|
||||
|
||||
if (header.version / 10000 != HPI_VER_DECIMAL / 10000) {
|
||||
HPI_DEBUG_LOG(ERROR,
|
||||
"firmware major version mismatch "
|
||||
"DSP image %d != driver %d\n", header.version,
|
||||
dev_printk(KERN_ERR, &ps_dsp_code->ps_dev->dev,
|
||||
"Firmware Major Version mismatch "
|
||||
"DSP image %d != Driver %d\n", header.version,
|
||||
HPI_VER_DECIMAL);
|
||||
goto error2;
|
||||
}
|
||||
|
||||
if (header.version != HPI_VER_DECIMAL) {
|
||||
HPI_DEBUG_LOG(WARNING,
|
||||
"version mismatch DSP image %d != driver %d\n",
|
||||
dev_printk(KERN_WARNING, &ps_dsp_code->ps_dev->dev,
|
||||
"firmware: version mismatch DSP image %d != Driver %d\n",
|
||||
header.version, HPI_VER_DECIMAL);
|
||||
/* goto error2; still allow driver to load */
|
||||
}
|
||||
|
||||
HPI_DEBUG_LOG(INFO, "dsp code %s opened\n", fw_name);
|
||||
HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);
|
||||
ps_dsp_code->ps_firmware = ps_firmware;
|
||||
ps_dsp_code->block_length = header.size / sizeof(u32);
|
||||
ps_dsp_code->word_count = sizeof(header) / sizeof(u32);
|
||||
|
@ -148,7 +152,7 @@ void hpi_dsp_code_rewind(struct dsp_code *ps_dsp_code)
|
|||
short hpi_dsp_code_read_word(struct dsp_code *ps_dsp_code, u32 *pword)
|
||||
{
|
||||
if (ps_dsp_code->word_count + 1 > ps_dsp_code->block_length)
|
||||
return (HPI_ERROR_DSP_FILE_FORMAT);
|
||||
return HPI_ERROR_DSP_FILE_FORMAT;
|
||||
|
||||
*pword = ((u32 *)(ps_dsp_code->ps_firmware->data))[ps_dsp_code->
|
||||
word_count];
|
||||
|
|
Loading…
Reference in a new issue