> > + return -EBUSY;
> > + }
> > + clear_bit(str_info->stream_index,
> > &s_stream_status.stream_info); +
> > + if (s_stream_status.stream_info == 0)
> > + close_ssp = true;
>
> What guarantees the right thing occurs if the other user opens first,
> closes first ?
[Selma] Each user has to perform an Open and Close of the used stream.
The Open function performs the SSP open only if no streams are already open
(s_stream_status.stream_info = 0) and sets the corresponding stream index
The Close function performs the SSP close only if no streams are still running
(s_stream_status.stream_info = 0)
> > + * Output parameters
> > + * ret_val : status
> > + */
> > +int intel_alsa_ssp_control(int command, struct
> > intel_alsa_ssp_stream_info *str_info) +{
> > + int retval = 0;
> > +
> > + switch (command) {
> > + case INTEL_ALSA_SSP_CTRL_SND_OPEN:
> > + retval = intel_alsa_ssp_open(str_info);
> > + break;
> > + /*
> > + * SND_PAUSE & SND_RESUME not supported in this version
> > + */
> > + case INTEL_ALSA_SSP_CTRL_SND_PAUSE:
> > + case INTEL_ALSA_SSP_CTRL_SND_RESUME:
> > + break;
> > +
> > + case INTEL_ALSA_SSP_CTRL_SND_CLOSE:
> > + intel_alsa_ssp_close(str_info);
> > + break;
> > +
> > + default:
> > + /* Illegal case */
> > + WARN(1, "ALSA_SSP: intel_alsa_ssp_control Error: Bad
> > Control ID\n");
>
> Not sure this should be warning - it's user triggerable ?
[Selma] this is an internal interface, I have also used the warning for the
ALSA trigger callback since I assumed that the only available trigger commands
are:
include/sound/pcm.h:#define SNDRV_PCM_TRIGGER_STOP 0
include/sound/pcm.h:#define SNDRV_PCM_TRIGGER_START 1
include/sound/pcm.h:#define SNDRV_PCM_TRIGGER_PAUSE_PUSH 3
include/sound/pcm.h:#define SNDRV_PCM_TRIGGER_PAUSE_RELEASE 4
include/sound/pcm.h:#define SNDRV_PCM_TRIGGER_SUSPEND 5
include/sound/pcm.h:#define SNDRV_PCM_TRIGGER_RESUME 6
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
Meego-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel