Changeset 772 for GPL/trunk/alsa-kernel/hda/hdmi_chmap.c
- Timestamp:
- Apr 19, 2025, 8:08:37 PM (6 months ago)
- Location:
- GPL/trunk
- Files:
- 
      - 2 edited
 
 - 
          
  . (modified) (1 prop)
- 
          
  alsa-kernel/hda/hdmi_chmap.c (modified) (3 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      GPL/trunk- Property svn:mergeinfo changed/GPL/branches/uniaud32-6.6-LTS (added) merged: 765,768-769 /GPL/branches/uniaud32-exp (added) merged: 735-741,743-744,748-751,753-760,762-764 /GPL/branches/uniaud32-next merged: 718-734 
 
- Property svn:mergeinfo changed
- 
      GPL/trunk/alsa-kernel/hda/hdmi_chmap.cr709 r772 761 761 } 762 762 763 /* a simple sanity check for input values to chmap kcontrol */ 764 static int chmap_value_check(struct hdac_chmap *hchmap, 765 const struct snd_ctl_elem_value *ucontrol) 766 { 767 int i; 768 769 for (i = 0; i < hchmap->channels_max; i++) { 770 if (ucontrol->value.integer.value[i] < 0 || 771 ucontrol->value.integer.value[i] > SNDRV_CHMAP_LAST) 772 return -EINVAL; 773 } 774 return 0; 775 } 776 763 777 static int hdmi_chmap_ctl_put(struct snd_kcontrol *kcontrol, 764 778 struct snd_ctl_elem_value *ucontrol) … … 772 786 int i, err, ca, prepared = 0; 773 787 788 err = chmap_value_check(hchmap, ucontrol); 789 if (err < 0) 790 return err; 791 774 792 /* No monitor is connected in dyn_pcm_assign. 775 793 * It's invalid to setup the chmap … … 782 800 if (!substream || !substream->runtime) 783 801 return 0; /* just for avoiding error from alsactl restore */ 784 switch (substream->runtime->stat us->state) {802 switch (substream->runtime->state) { 785 803 case SNDRV_PCM_STATE_OPEN: 786 804 case SNDRV_PCM_STATE_SETUP: 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
