Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67ed4161 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Jaroslav Kysela
Browse files

[ALSA] sound - fix .iface field of mixer control elements



Documentation,CS46xx driver,EMU10K1/EMU10K2 driver,AD1848 driver
SB16/AWE driver,CMIPCI driver,ENS1370/1+ driver,RME32 driver
RME96 driver,ICE1712 driver,ICE1724 driver,KORG1212 driver
RME HDSP driver,RME9652 driver
This patch changes .iface to SNDRV_CTL_ELEM_IFACE_MIXER whre _PCM or
_HWDEP was used in controls that are not associated with a specific PCM
(sub)stream or hwdep device, and changes some controls that got
inconsitent .iface values due to copy+paste errors.  Furthermore, it
makes sure that all control that do use _PCM or _HWDEP use the correct
number in the .device field.

Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
parent 42dfd0ad
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -3422,10 +3422,17 @@ struct _snd_pcm_runtime {

      <para>
        The <structfield>iface</structfield> field specifies the type of
      the control,
      <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>. There are
      <constant>MIXER</constant>, <constant>PCM</constant>,
      <constant>CARD</constant>, etc.
      the control, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which
      is usually <constant>MIXER</constant>.
      Use <constant>CARD</constant> for global controls that are not
      logically part of the mixer.
      If the control is closely associated with some specific device on
      the sound card, use <constant>HWDEP</constant>,
      <constant>PCM</constant>, <constant>RAWMIDI</constant>,
      <constant>TIMER</constant>, or <constant>SEQUENCER</constant>, and
      specify the device number with the
      <structfield>device</structfield> and
      <structfield>subdevice</structfield> fields.
      </para>

      <para>
+1 −1
Original line number Diff line number Diff line
@@ -1748,7 +1748,7 @@ int snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
int snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
int snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
int snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
int snd_cs46xx_mixer(cs46xx_t *chip);
int snd_cs46xx_mixer(cs46xx_t *chip, int spdif_device);
int snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rmidi);
int snd_cs46xx_start_dsp(cs46xx_t *chip);
int snd_cs46xx_gameport(cs46xx_t *chip);
+1 −1
Original line number Diff line number Diff line
@@ -1178,7 +1178,7 @@ int snd_p16v_free(emu10k1_t * emu);
int snd_p16v_mixer(emu10k1_t * emu);
int snd_emu10k1_pcm_multi(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
int snd_emu10k1_fx8010_pcm(emu10k1_t * emu, int device, snd_pcm_t ** rpcm);
int snd_emu10k1_mixer(emu10k1_t * emu);
int snd_emu10k1_mixer(emu10k1_t * emu, int pcm_device, int multi_device);
int snd_emu10k1_timer(emu10k1_t * emu, int device);
int snd_emu10k1_fx8010_new(emu10k1_t *emu, int device, snd_hwdep_t ** rhwdep);

+1 −0
Original line number Diff line number Diff line
@@ -1196,6 +1196,7 @@ int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, un
			.put = snd_ad1848_put_double,
		},
		[AD1848_MIX_CAPTURE] = {
			.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
			.info = snd_ad1848_info_mux,
			.get = snd_ad1848_get_mux,
			.put = snd_ad1848_put_mux,
+1 −1
Original line number Diff line number Diff line
@@ -729,7 +729,7 @@ static int snd_sb16_dma_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
}

static snd_kcontrol_new_t snd_sb16_dma_control = {
	.iface = SNDRV_CTL_ELEM_IFACE_PCM,
	.iface = SNDRV_CTL_ELEM_IFACE_CARD,
	.name = "16-bit DMA Allocation",
	.info = snd_sb16_dma_control_info,
	.get = snd_sb16_dma_control_get,
Loading