diff options
author | Ian Minett <ian_minett@creativelabs.com> | 2012-12-20 18:53:41 -0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-15 17:01:16 +0100 |
commit | 406261ce998589dc980d9a6683a5ef3153eec1a5 (patch) | |
tree | e4a68a41886d26597e9a0ec7f0972f8e882be6f7 | |
parent | 441aa6a016f66f2d20a95d1afafe3e47254a666f (diff) | |
download | blackbird-op-linux-406261ce998589dc980d9a6683a5ef3153eec1a5.tar.gz blackbird-op-linux-406261ce998589dc980d9a6683a5ef3153eec1a5.zip |
ALSA: hda/ca0132: Fix potential init errors and update module description
Handle a potential dma_engine alloc error and fix the possible use of an
uninitialized status variable in dspxfr_one_seg(). Also correct the initial
sampling rate for Mic 1.
Update the module description.
Signed-off-by: Ian Minett <ian_minett@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_ca0132.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 4c9b95e56567..2b026e2733c8 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -2223,7 +2223,7 @@ static int dspxfr_one_seg(struct hda_codec *codec, unsigned int port_map_mask, bool ovly) { - int status; + int status = 0; bool comm_dma_setup_done = false; const unsigned int *data; unsigned int chip_addx; @@ -2416,8 +2416,10 @@ static int dspxfr_image(struct hda_codec *codec, return -EINVAL; dma_engine = kzalloc(sizeof(*dma_engine), GFP_KERNEL); - if (!dma_engine) - return -ENOMEM; + if (!dma_engine) { + status = -ENOMEM; + goto exit; + } dma_engine->dmab = kzalloc(sizeof(*dma_engine->dmab), GFP_KERNEL); if (!dma_engine->dmab) { @@ -4340,8 +4342,8 @@ static void ca0132_set_dsp_msr(struct hda_codec *codec, bool is96k) chipio_set_control_flag(codec, CONTROL_FLAG_ADC_B_96KHZ, is96k); chipio_set_control_flag(codec, CONTROL_FLAG_ADC_C_96KHZ, is96k); - chipio_set_conn_rate(codec, MEM_CONNID_MICIN1, SR_16_000); - chipio_set_conn_rate(codec, MEM_CONNID_MICOUT1, SR_16_000); + chipio_set_conn_rate(codec, MEM_CONNID_MICIN1, SR_96_000); + chipio_set_conn_rate(codec, MEM_CONNID_MICOUT1, SR_96_000); chipio_set_conn_rate(codec, MEM_CONNID_WUH, SR_48_000); } @@ -4685,7 +4687,7 @@ static struct hda_codec_preset snd_hda_preset_ca0132[] = { MODULE_ALIAS("snd-hda-codec-id:11020011"); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Creative CA0132, CA0132 HD-audio codec"); +MODULE_DESCRIPTION("Creative Sound Core3D codec"); static struct hda_codec_preset_list ca0132_list = { .preset = snd_hda_preset_ca0132, |