From: Takashi Iwai Subject: Re: [PATCH 7/7] ALSA: CA0132: Update sample rate and module description Date: Mon, 10 Dec 2012 10:56:35 +0100 Message-ID: References: <1354944963-4654-1-git-send-email-ian_minett@creativelabs.com> <1354944963-4654-8-git-send-email-ian_minett@creativelabs.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 7930726030F for ; Mon, 10 Dec 2012 11:33:50 +0100 (CET) In-Reply-To: <1354944963-4654-8-git-send-email-ian_minett@creativelabs.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Ian Minett Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 7 Dec 2012 21:36:03 -0800, Ian Minett wrote: > > From: Ian Minett Again, please a bit more description what the subject "Update sample rate" means. Takashi > > Also, handle potential dma_engine alloc error. > > Signed-off-by: Ian Minett > > diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c > index 21380f1..7ada5e6 100644 > --- a/sound/pci/hda/patch_ca0132.c > +++ b/sound/pci/hda/patch_ca0132.c > @@ -2399,8 +2399,11 @@ 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; > + } > + memset((void *)dma_engine, 0, sizeof(*dma_engine)); > > dma_engine->dmab = kzalloc(sizeof(*dma_engine->dmab), GFP_KERNEL); > if (!dma_engine->dmab) { > @@ -4289,8 +4292,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); > } > > @@ -4635,7 +4638,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, > -- > 1.7.4.1 >