reading peak meter values from a RME HDSP madi soundcard

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

 



Hi,

I'd like to read the peak values of the RME HDSP madi soundcard. To do
this, I use the function: snd_hwdep_ioctl() with the ioctl command
"SNDRV_HDSPM_IOCTL_GET_PEAK_RMS".

I use the following code:

  // create container
  hdspm_peak_rms_t madi_peak_rms;
  hdspm_peak_rms_t* ptr_madi_peak_rms = &madi_peak_rms;

  //snd_hwdep_open
  ...

  // fill the container with values
  snd_hwdep_ioctl(hw,
                  SNDRV_HDSPM_IOCTL_GET_PEAK_RMS,
                  (void *)&ptr_madi_peak_rms);

  for (unsigned int chn = 0; chn < numberOfChannels; ++chn)
  {
    //put values from madi soundcard into std::vector containers
    currentInputPeak[chn] = madi_peak_rms.level_offset[chn];
    currentPlaybackPeak[chn] = madi_peak_rms.level_offset[chn+64];
    currentOutputPeak[chn] = madi_peak_rms.level_offset[chn+128];
  }

The upper 24 bit of the read out values should be the signal peak. The
next 8 bit seem to represent a clipping counter.

For the first eight input channels this works pretty well. But for every
eighth channel of all further channels (input, playback and output) the
peak value is to low and is not in time with the other channels.


Do i use the function in the right way?

Is there a special function to get the peak meter values? (In a similar
way as for ADAT soundcards?)


Best regards.
_______________________________________________
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