From: Hsin-Yu Chao Date: Wed, 19 Feb 2014 06:30:35 +0000 (+0800) Subject: ALSA: hda/ca0132 - Fix recording from mode id 0x8 X-Git-Tag: upstream/snapshot3+hdmi~3273^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13c12dbe3a2ce17227f7ddef652b6a53c78fa51f;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ALSA: hda/ca0132 - Fix recording from mode id 0x8 Incorrect ADC is picked in ca0132_capture_pcm_prepare(), where it assumes multiple streams while there is one stream per ADC. Note that ca0132_capture_pcm_cleanup() already does the right thing. The Chromebook Pixel has a microphone under the keyboard that is attached to node id 0x8. Before this fix, recording would always go to the main internal mic (node id 0x7). Signed-off-by: Hsin-Yu Chao Reviewed-by: Dylan Reid Cc: Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 0aa72ee..46ecdbb 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -2768,9 +2768,7 @@ static int ca0132_capture_pcm_prepare(struct hda_pcm_stream *hinfo, unsigned int format, struct snd_pcm_substream *substream) { - struct ca0132_spec *spec = codec->spec; - - snd_hda_codec_setup_stream(codec, spec->adcs[substream->number], + snd_hda_codec_setup_stream(codec, hinfo->nid, stream_tag, 0, format); return 0;