From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: ALSA become "Segmentation fault" on current linus tree Date: Tue, 05 Jul 2011 08:33:51 +0200 Message-ID: References: <87k4bxfjue.wl%kuninori.morimoto.gx@renesas.com> <87ei25fewa.wl%kuninori.morimoto.gx@renesas.com> <87d3hpfefz.wl%kuninori.morimoto.gx@renesas.com> <87aactfdf0.wl%kuninori.morimoto.gx@renesas.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 082D9245DA for ; Tue, 5 Jul 2011 08:33:52 +0200 (CEST) In-Reply-To: <87aactfdf0.wl%kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: kuninori.morimoto.gx@renesas.com Cc: Linux-ALSA , Mark Brown , Kuninori Morimoto , Liam Girdwood List-Id: alsa-devel@alsa-project.org At Tue, 05 Jul 2011 15:29:39 +0900, kuninori.morimoto.gx@renesas.com wrote: > > > Dear Takashi > > > So, driver name setup seems screwing up. > > What shows /proc/asound/cards? It contains also the driver string. > > Current /proc/asound/cards is > > ---------------------------------- > # cat /proc/asound/cards > 0 [AK4643 ]: FSI2A (AK4643) - FSI2A (AK4643) > FSI2A (AK4643) > 1 [HDMI ]: FSI2B (SH MOBIL - FSI2B (SH MOBILE HDMI) > FSI2B (SH MOBILE HDMI) > ---------------------------------- > > Ohh my... > If I modified like this, it start works > > ---------------------------------- > # cat /proc/asound/cards > 0 [FSI2A ]: FSI2A - FSI2A > FSI2A > 1 [FSI2B ]: FSI2B - FSI2B > FSI2B > ---------------------------------- > > Should it be short name ? For the compatible behavior, we can keep it empty like the patch below. It wasn't set in the earlier versions. Alternatively, driver name can be deduced from shortname by replacing invalid characters. In general, it shouldn't contain space letters and special letters like parentheses. But, driver_name should override if defined, and ASoC stuff has worked well without driver name setup, we can keep it empty as default, I guess. thanks, Takashi --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d08abf4..954e3b7 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1420,8 +1420,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) "%s", card->name); snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), "%s", card->long_name ? card->long_name : card->name); - snprintf(card->snd_card->driver, sizeof(card->snd_card->driver), - "%s", card->driver_name ? card->driver_name : card->name); + if (card->driver_name) + snprintf(card->snd_card->driver, sizeof(card->snd_card->driver), + "%s", card->driver_name); if (card->late_probe) { ret = card->late_probe(card);