Re: [resend][PATCH v5 05/10] ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob

> > @@ -82,14 +82,24 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card,
> >                                      char *prefix)
> >  {
> >         char prop[128];
> > +       char *names[] = {
> > +               "label", "name"
> > +       };
> > +       int i;
> >         int ret;
> >
> > -       snprintf(prop, sizeof(prop), "%sname", prefix);
> > +       if (!prefix)
> > +               prefix = "";
> >
> >         /* Parse the card name from DT */
> > -       ret = snd_soc_of_parse_card_name(card, prop);
> > -       if (ret < 0)
> > -               return ret;
> > +       for (i = 0; i < ARRAY_SIZE(names); i++) {
> > +               snprintf(prop, sizeof(prop), "%s%s", prefix, names[i]);
> 
> "<prefix>label" is not a valid property name.

This function will be used from many drivers.
Not only for OF-graph sound card.
OF-graph sound card will use it without prefix.

Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux