ucm: Assure the user input card name not to exceed max size of card long name

Users can load a card's UCM configuration file by giving the card short
name or long name, which should not exceed the maximum card long name
defined by the kernel. The kernel uses an 80-character buffer to store
the card long name.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Mengdong Lin 2017-01-18 11:52:35 +08:00 committed by Takashi Iwai
parent 24e63b7527
commit 2b9b3f0134
2 changed files with 7 additions and 0 deletions

View file

@ -41,6 +41,7 @@
#include "use-case.h"
#define MAX_FILE 256
#define MAX_CARD_LONG_NAME 80
#define ALSA_USE_CASE_DIR ALSA_CONFIG_DIR "/ucm"
#define SEQUENCE_ELEMENT_TYPE_CDEV 1