usb audio: Let the usb sound card index from 1
Prop from (CR) If we have usb digital headphone pulled in during bootup. It will occupy index 0. primary sound card can only use index 1. But in our most audio code, We assume the primary sound card is 0. This will cause no sound issue when we use primary sound card to playback and record. Change-Id: Ic6cc79fc475e4e9978535f9557f05cef8c65d1f1 Signed-off-by: niuli1 <niuli1@lenovo.com> Reviewed-on: https://gerrit.mot.com/1093502 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Dandan Du <dudd1@motorola.com> Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1516459 Reviewed-by: Yuesheng Huang <huangys@motorola.com> (cherry picked from commit 780fde85cfdaaeb836c93b52cfd98210e5a98c30) Reviewed-on: https://gerrit.mot.com/1586901 Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
This commit is contained in:
1 parent
bfee3cd8d5
commit
0d73a54fe2
2 files changed
+2
-1
No files matched your search
@@ -36,6 +36,7 @@
|
|||||||
#define SNDRV_DEFAULT_PTR1 SNDRV_DEFAULT_STR1
|
#define SNDRV_DEFAULT_PTR1 SNDRV_DEFAULT_STR1
|
||||||
|
|
||||||
#define SNDRV_DEFAULT_IDX { [0 ... (SNDRV_CARDS-1)] = -1 }
|
#define SNDRV_DEFAULT_IDX { [0 ... (SNDRV_CARDS-1)] = -1 }
|
||||||
|
#define SNDRV_DEFAULT_IDX_N { 1, [1 ... (SNDRV_CARDS-1)] = -1 }
|
||||||
#define SNDRV_DEFAULT_STR { [0 ... (SNDRV_CARDS-1)] = NULL }
|
#define SNDRV_DEFAULT_STR { [0 ... (SNDRV_CARDS-1)] = NULL }
|
||||||
#define SNDRV_DEFAULT_ENABLE { 1, [1 ... (SNDRV_CARDS-1)] = 0 }
|
#define SNDRV_DEFAULT_ENABLE { 1, [1 ... (SNDRV_CARDS-1)] = 0 }
|
||||||
#define SNDRV_DEFAULT_ENABLE_PNP { [0 ... (SNDRV_CARDS-1)] = 1 }
|
#define SNDRV_DEFAULT_ENABLE_PNP { [0 ... (SNDRV_CARDS-1)] = 1 }
|
||||||
|
|||||||
+1
-1
@@ -75,7 +75,7 @@ MODULE_LICENSE("GPL");
|
|||||||
MODULE_SUPPORTED_DEVICE("{{Generic,USB Audio}}");
|
MODULE_SUPPORTED_DEVICE("{{Generic,USB Audio}}");
|
||||||
|
|
||||||
|
|
||||||
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
|
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX_N; /* Index 0-MAX */
|
||||||
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
|
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
|
||||||
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;/* Enable this card */
|
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;/* Enable this card */
|
||||||
/* Vendor/product IDs for this card */
|
/* Vendor/product IDs for this card */
|
||||||
|
|||||||
Reference in new issue
Block a user