mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	ctl: improve API documentation for threshold level operations
In alsa-lib, threshold level operations require an array of unsigned-int members, while there's little explanation about how to fill it. To usual developers such as me, they're quite hard to understand. This commit adds a few comment for easy understanding about how to use the APIs. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									677160d226
								
							
						
					
					
						commit
						fe1b08803d
					
				
					 1 changed files with 15 additions and 15 deletions
				
			
		| 
						 | 
					@ -882,14 +882,12 @@ static int snd_ctl_tlv_do(snd_ctl_t *ctl, int op_flag,
 | 
				
			||||||
	return err;
 | 
						return err;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Get CTL element TLV value
 | 
					 * \brief Set given data to an element as threshold level.
 | 
				
			||||||
 * \param ctl CTL handle
 | 
					 * \param ctl A handle of backend module for control interface.
 | 
				
			||||||
 * \param id CTL element id pointer
 | 
					 * \param id ID of an element.
 | 
				
			||||||
 * \param tlv TLV array pointer to store 
 | 
					 * \param tlv An array with members of unsigned int type.
 | 
				
			||||||
 * \param tlv_size TLV array size in bytes
 | 
					 * \param tlv_size The length of the array.
 | 
				
			||||||
 * \return 0 on success otherwise a negative error code
 | 
					 * \return 0 on success otherwise a negative error code
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_ctl_elem_tlv_read(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id,
 | 
					int snd_ctl_elem_tlv_read(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id,
 | 
				
			||||||
| 
						 | 
					@ -913,10 +911,11 @@ int snd_ctl_elem_tlv_read(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Set CTL element TLV value
 | 
					 * \brief Set given data to an element as threshold level.
 | 
				
			||||||
 * \param ctl CTL handle
 | 
					 * \param ctl A handle of backend module for control interface.
 | 
				
			||||||
 * \param id CTL element id pointer
 | 
					 * \param id ID of an element.
 | 
				
			||||||
 * \param tlv TLV array pointer to store 
 | 
					 * \param tlv An array with members of unsigned int type. The second member
 | 
				
			||||||
 | 
					 *	      must represent total bytes of the rest of array.
 | 
				
			||||||
 * \retval 0 on success
 | 
					 * \retval 0 on success
 | 
				
			||||||
 * \retval >0 on success when value was changed
 | 
					 * \retval >0 on success when value was changed
 | 
				
			||||||
 * \retval <0 a negative error code
 | 
					 * \retval <0 a negative error code
 | 
				
			||||||
| 
						 | 
					@ -929,10 +928,11 @@ int snd_ctl_elem_tlv_write(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Process CTL element TLV command
 | 
					 * \brief Set given data to an element as threshold level.
 | 
				
			||||||
 * \param ctl CTL handle
 | 
					 * \param ctl A handle of backend module for control interface.
 | 
				
			||||||
 * \param id CTL element id pointer
 | 
					 * \param id ID of an element.
 | 
				
			||||||
 * \param tlv TLV array pointer to process
 | 
					 * \param tlv An array with members of unsigned int type. The second member
 | 
				
			||||||
 | 
					 *	      must represent total bytes of the rest of array.
 | 
				
			||||||
 * \retval 0 on success
 | 
					 * \retval 0 on success
 | 
				
			||||||
 * \retval >0 on success when value was changed
 | 
					 * \retval >0 on success when value was changed
 | 
				
			||||||
 * \retval <0 a negative error code
 | 
					 * \retval <0 a negative error code
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue