All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: ffado-devel@lists.sourceforge.net, alsa-devel@alsa-project.org,
	clemens@ladisch.de
Subject: Re: [PATCH 21/30] ALSA: oxfw: Change the way to name card
Date: Sat, 29 Nov 2014 20:37:19 +0100	[thread overview]
Message-ID: <s5hbnnpbxxs.wl-tiwai@suse.de> (raw)
In-Reply-To: <1417190379-4172-22-git-send-email-o-takashi@sakamocchi.jp>

At Sat, 29 Nov 2014 00:59:30 +0900,
Takashi Sakamoto wrote:
> 
> The 'struct snd_card' has 4 members for name. They're 'driver', 'shortname',
> 'longname' and 'mixername'. This commit names these 4 members according to
> two members in model-specific structure and reduce rest of members in the
> structure.
> 
> The reason that alias names are still used is that currently supported devices,
> Griffin FireWave and LaCie Firewire Speaker have too long names for model and
> vendor field in their config rom to be over allocated buffer for the names.
> 
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
>  sound/firewire/oxfw/oxfw.c | 51 +++++++++++++++++++++++++++-------------------
>  sound/firewire/oxfw/oxfw.h |  3 +--
>  2 files changed, 31 insertions(+), 23 deletions(-)
> 
> diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
> index 951d9a4..3308253 100644
> --- a/sound/firewire/oxfw/oxfw.c
> +++ b/sound/firewire/oxfw/oxfw.c
> @@ -25,14 +25,34 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
>  MODULE_LICENSE("GPL v2");
>  MODULE_ALIAS("snd-firewire-speakers");
>  
> -static u32 oxfw_read_firmware_version(struct fw_unit *unit)
> +static int name_card(struct snd_oxfw *oxfw)
>  {
> -	__be32 data;
> +	struct fw_device *fw_dev = fw_parent_device(oxfw->unit);
> +	const char *d, *v, *m;
> +	u32 firmware;
>  	int err;
>  
> -	err = snd_fw_transaction(unit, TCODE_READ_QUADLET_REQUEST,
> -				 OXFORD_FIRMWARE_ID_ADDRESS, &data, 4, 0);
> -	return err >= 0 ? be32_to_cpu(data) : 0;
> +	err = snd_fw_transaction(oxfw->unit, TCODE_READ_QUADLET_REQUEST,
> +				 OXFORD_FIRMWARE_ID_ADDRESS, &firmware, 4, 0);
> +	if (err < 0)
> +		goto end;
> +	be32_to_cpus(&firmware);
> +
> +	d = oxfw->device_info->driver_name;
> +	v = oxfw->device_info->vendor_name;
> +	m = oxfw->device_info->driver_name;
> +
> +	strcpy(oxfw->card->driver, d);
> +	strcpy(oxfw->card->shortname, m);
> +	strcpy(oxfw->card->mixername, m);

So, this ends up with the identical strings for both driver and
shortname?  This doesn't sound like an improvement.


thanks,

Takashi

  reply	other threads:[~2014-11-29 19:37 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28 15:59 [PATCH 00/30 v3] ALSA: Enhancement for existed FireWire drivers Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 01/30] ALSA: dice: suppress checkpatch.pl warnings Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 02/30] ALSA: dice: Rename structure and its members Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 03/30] ALSA: dice: Move file to its own directory Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 04/30] ALSA: dice: Split transaction functionality into a file Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 05/30] ALSA: dice: Split stream " Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 06/30] ALSA: dice: Split PCM " Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 07/30] ALSA: dice: Split hwdep " Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 08/30] ALSA: dice: Split proc interface " Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 09/30] ALSA: dice: Add new functions for constraints of PCM parameters Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 10/30] ALSA: dice: Change the way to start stream Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 11/30] ALSA: dice: Add support for duplex streams with synchronization Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 12/30] ALSA: dice: Support for non SYT-Match sampling clock source mode Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 13/30] ALSA: dice: Add support for capturing PCM samples Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 14/30] ALSA: dice: Add support for MIDI capture/playback Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 15/30] ALSA: dice: remove experimental state Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 16/30] ALSA: speakers: Rename to oxfw and rename some members Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 17/30] ALSA: oxfw: Move to its own directory Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 18/30] ALSA: oxfw: Split stream functionality to a new file and add a header file Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 19/30] ALSA: oxfw: Split PCM functionality to a new file Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 20/30] ALSA: oxfw: Split control " Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 21/30] ALSA: oxfw: Change the way to name card Takashi Sakamoto
2014-11-29 19:37   ` Takashi Iwai [this message]
2014-11-30  4:33     ` Takashi Sakamoto
2014-11-30  8:31       ` Takashi Iwai
2014-11-30 23:19         ` Takashi Sakamoto
2014-12-01  8:41           ` Takashi Iwai
2014-12-01 11:21             ` Clemens Ladisch
2014-12-01 15:05               ` Takashi Sakamoto
2014-12-01 15:21                 ` Takashi Iwai
2014-12-02  6:17                   ` Takashi Sakamoto
2014-12-02  6:41                     ` Takashi Iwai
2014-12-03 14:19                       ` Takashi Sakamoto
2014-12-01 14:58             ` Takashi Sakamoto
2014-12-01 15:22               ` Takashi Iwai
2014-11-28 15:59 ` [PATCH 22/30] ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 23/30] ALSA: oxfw: Change the way to make PCM rules/constraints Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 24/30] ALSA: oxfw: Add proc interface for debugging purpose Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 25/30] ALSA: oxfw: Change the way to start stream Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 26/30] ALSA: oxfw: Add support for Behringer/Mackie devices Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 27/30] ALSA: oxfw: Add support AMDTP in-stream Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 28/30] ALSA: oxfw: add support for capturing PCM samples Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 29/30] ALSA: oxfw: Add support for capture/playback MIDI messages Takashi Sakamoto
2014-11-28 15:59 ` [PATCH 30/30] ALSA: oxfw: Add hwdep interface Takashi Sakamoto
2014-11-28 16:03 ` [PATCH alsa-lib] hwdep: add OXFW driver support Takashi Sakamoto
2014-11-29 19:35 ` [PATCH 00/30 v3] ALSA: Enhancement for existed FireWire drivers Takashi Iwai
2014-11-30  3:21   ` Takashi Sakamoto
2014-11-30  8:35     ` Takashi Iwai

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=s5hbnnpbxxs.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=ffado-devel@lists.sourceforge.net \
    --cc=o-takashi@sakamocchi.jp \
    /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.