Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938316AbXFHHei (ORCPT ); Fri, 8 Jun 2007 03:34:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S938364AbXFHHX2 (ORCPT ); Fri, 8 Jun 2007 03:23:28 -0400 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:58326 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938357AbXFHHX1 (ORCPT ); Fri, 8 Jun 2007 03:23:27 -0400 Message-Id: <20070608072155.283117000@sous-sol.org> References: <20070608072127.352723000@sous-sol.org> User-Agent: quilt/0.46-1 Date: Fri, 08 Jun 2007 00:21:38 -0700 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org, Dave Jones Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Takashi Iwai , Jaroslav Kysela , Greg Kroah-Hartman Subject: [patch 11/54] ALSA: hda-intel - Fix detection of audio codec on Toshiba A100 Content-Disposition: inline; filename=alsa-hda-intel-fix-detection-of-audio-codec-on-toshiba-a100.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2037 Lines: 60 -stable review patch. If anyone has any objections, please let us know. --------------------- From: Takashi Iwai Some boards have the audio codec on slot #3 while the modem codec on slot #0. The driver should continue to probe the slots when no audio codec is found. This fixes the problem of no device on Toshiba A100 (and some other ATI SB450 devices). Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/hda_intel.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- linux-2.6.21.4.orig/sound/pci/hda/hda_intel.c +++ linux-2.6.21.4/sound/pci/hda/hda_intel.c @@ -979,7 +979,7 @@ static unsigned int azx_max_codecs[] __d static int __devinit azx_codec_create(struct azx *chip, const char *model) { struct hda_bus_template bus_temp; - int c, codecs, err; + int c, codecs, audio_codecs, err; memset(&bus_temp, 0, sizeof(bus_temp)); bus_temp.private_data = chip; @@ -991,16 +991,19 @@ static int __devinit azx_codec_create(st if ((err = snd_hda_bus_new(chip->card, &bus_temp, &chip->bus)) < 0) return err; - codecs = 0; + codecs = audio_codecs = 0; for (c = 0; c < AZX_MAX_CODECS; c++) { if ((chip->codec_mask & (1 << c)) & probe_mask) { - err = snd_hda_codec_new(chip->bus, c, NULL); + struct hda_codec *codec; + err = snd_hda_codec_new(chip->bus, c, &codec); if (err < 0) continue; codecs++; + if (codec->afg) + audio_codecs++; } } - if (!codecs) { + if (!audio_codecs) { /* probe additional slots if no codec is found */ for (; c < azx_max_codecs[chip->driver_type]; c++) { if ((chip->codec_mask & (1 << c)) & probe_mask) { -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/