All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Cc: "Robert Steffens" <robert.steffens@iosono-sound.com>,
	"ALSA development" <alsa-devel@alsa-project.org>,
	"Jörn Nettingsmeier" <nettings@stackingdwarves.net>,
	"Fredrik Lingvall" <fredrik.lingvall@gmail.com>,
	"Andre Schramm" <andre.schramm@iosono-sound.com>
Subject: Re: [RME MADI/RayDAT/AIO/AES] Changing hdspm_config and	hdspm_status
Date: Tue, 23 Aug 2011 12:53:48 +0200	[thread overview]
Message-ID: <s5hpqjwpfer.wl%tiwai@suse.de> (raw)
In-Reply-To: <4E5283CB.7070902@drcomp.erfurt.thur.de>

At Mon, 22 Aug 2011 18:28:59 +0200,
Adrian Knoth wrote:
> 
> Hi!
> 
> Florian Faber has sent me some new bits of his work on hdspm. While the
> changes to hdspm.c are straight-forward, he also cleaned up struct
> hdspm_config and hdspm_status, thus changing the userspace API/ABI:
> 
> 
> diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h
> index 1f59ea2..25eab09 100644
> --- a/include/sound/hdspm.h
> +++ b/include/sound/hdspm.h
> @@ -58,17 +58,20 @@ struct hdspm_peak_rms {
>  /* ------------ CONFIG block IOCTL ---------------------- */
> 
>  struct hdspm_config {
> -	unsigned char pref_sync_ref;
> -	unsigned char wordclock_sync_check;
> -	unsigned char madi_sync_check;
> -	unsigned int system_sample_rate;
> -	unsigned int autosync_sample_rate;
> -	unsigned char system_clock_mode;
> -	unsigned char clock_source;
> -	unsigned char autosync_ref;
> -	unsigned char line_out;
> -	unsigned int passthru;
> -	unsigned int analog_out;
> +	uint32_t dds;       /* dds increment */
> +	uint16_t freq;      /* 32000/44100/48000 */
> +	uint8_t wck_mul;    /* 1/2/4 */
> +	uint8_t clock_mode; /* 0=master, 1=slave */
> +	union {
> +		struct {
> +			uint8_t line_out;     /* 0=disabled, 1=enabled */
> +			uint8_t tms;          /* 0=disabled, 1=enabled */
> +			uint8_t input_select; /* 0=BNC, 1=optical */
> +			uint8_t output_mode;  /* 0=56ch, 1=64ch */
> +			uint8_t output_frame; /* 0=48K, 1=96K */
> +			uint8_t sync_ref;     /* 0=WCK, 1=MADI, 2=TCO/SYNC_IN, 3=SYNC_IN */
> +		} madi;
> +	} card_specific;
>  };
> 
>  #define SNDRV_HDSPM_IOCTL_GET_CONFIG \
> @@ -161,7 +164,6 @@ struct hdspm_status {
>  			uint8_t sync_madi; /* enum hdspm_sync */
>  			uint8_t sync_tco; /* enum hdspm_sync */
>  			uint8_t sync_in; /* enum hdspm_sync */
> -			uint8_t madi_input; /* enum hdspm_madi_input */
>  			uint8_t channel_format; /* enum hdspm_madi_channel_format */
>  			uint8_t frame_format; /* enum hdspm_madi_frame_format */
>  		} madi;
> 
> 
> 
> I guess this means we'd need to redefine two ioctl numbers. Besides
> this, are there any current users of this code?

It's hardly to tell.  But in general, once when the code is
upstreamed, basically you can't change in an incompatible way.
So, changing the existing ioctl struct is no-go.  It's worse than
dropping the ioctl.  Please implement a new ioctl instead.


thanks,

Takashi

      parent reply	other threads:[~2011-08-23 10:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-22 16:28 [RME MADI/RayDAT/AIO/AES] Changing hdspm_config and hdspm_status Adrian Knoth
2011-08-22 16:31 ` Adrian Knoth
2011-08-22 16:42   ` Adrian Knoth
2011-08-23 10:53 ` Takashi Iwai [this message]

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=s5hpqjwpfer.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=adi@drcomp.erfurt.thur.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=andre.schramm@iosono-sound.com \
    --cc=fredrik.lingvall@gmail.com \
    --cc=nettings@stackingdwarves.net \
    --cc=robert.steffens@iosono-sound.com \
    /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.