All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: kuninori.morimoto.gx@renesas.com
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: ALSA become "Segmentation fault" on current linus tree
Date: Tue, 05 Jul 2011 08:33:51 +0200	[thread overview]
Message-ID: <s5hei25fd80.wl%tiwai@suse.de> (raw)
In-Reply-To: <87aactfdf0.wl%kuninori.morimoto.gx@renesas.com>

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);

  reply	other threads:[~2011-07-05  6:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  4:10 ALSA become "Segmentation fault" on current linus tree kuninori.morimoto.gx
2011-07-05  5:41 ` Takashi Iwai
2011-07-05  5:57   ` kuninori.morimoto.gx
2011-07-05  6:06     ` Takashi Iwai
2011-07-05  6:08       ` kuninori.morimoto.gx
2011-07-05  6:07     ` kuninori.morimoto.gx
2011-07-05  6:19       ` Takashi Iwai
2011-07-05  6:29         ` kuninori.morimoto.gx
2011-07-05  6:33           ` Takashi Iwai [this message]
2011-07-05  6:52             ` kuninori.morimoto.gx
2011-07-05  7:12               ` kuninori.morimoto.gx
2011-07-05  7:15                 ` [PATCH 1/3] ASoC: sh: fsi-ak4642: fixup snd_soc_card name Kuninori Morimoto
2011-07-09 10:06                   ` Mark Brown
2011-07-05  7:16                 ` [PATCH 2/3] ASoC: sh: fsi-da7210: " Kuninori Morimoto
2011-07-05  7:16                 ` [PATCH 3/3] ASoC: sh: fsi-hdmi: " Kuninori Morimoto
2011-07-05  7:33                 ` ALSA become "Segmentation fault" on current linus tree Takashi Iwai
2011-07-05  8:11                   ` kuninori.morimoto.gx
2011-07-05 10:22                   ` Liam Girdwood
2011-07-05 12:41                     ` Takashi Iwai
2011-07-05 17:14                       ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hei25fd80.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.