add stereo as keyword for ALSA
authora0220410 <peter-li@ti.com>
Thu, 18 Aug 2016 14:21:25 +0000 (22:21 +0800)
committera0220410 <peter-li@ti.com>
Thu, 18 Aug 2016 14:21:25 +0000 (22:21 +0800)
tas2555-codec.c

index a9e2cfe795c30b08e783f4654c6ec7b4f5291f81..4c55067386795a8b72e084826a648580e0925792 100755 (executable)
@@ -85,27 +85,27 @@ static int tas2555_codec_write(struct snd_soc_codec *pCodec, unsigned int nRegis
 }
 
 static const struct snd_soc_dapm_widget tas2555_dapm_widgets[] = {
-       SND_SOC_DAPM_AIF_IN("ASI1", "ASI1 Playback", 0, SND_SOC_NOPM, 0, 0),
-       SND_SOC_DAPM_AIF_IN("ASI2", "ASI2 Playback", 0, SND_SOC_NOPM, 0, 0),
-       SND_SOC_DAPM_AIF_IN("ASIM", "ASIM Playback", 0, SND_SOC_NOPM, 0, 0),
-       SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
+       SND_SOC_DAPM_AIF_IN("Stereo ASI1", "Stereo ASI1 Playback", 0, SND_SOC_NOPM, 0, 0),
+       SND_SOC_DAPM_AIF_IN("Stereo ASI2", "Stereo ASI2 Playback", 0, SND_SOC_NOPM, 0, 0),
+       SND_SOC_DAPM_AIF_IN("Stereo ASIM", "Stereo ASIM Playback", 0, SND_SOC_NOPM, 0, 0),
+       SND_SOC_DAPM_DAC("Stereo DAC", NULL, SND_SOC_NOPM, 0, 0),
 
-       SND_SOC_DAPM_OUT_DRV("ClassD", SND_SOC_NOPM, 0, 0, NULL, 0),
+       SND_SOC_DAPM_OUT_DRV("Stereo ClassD", SND_SOC_NOPM, 0, 0, NULL, 0),
 
-       SND_SOC_DAPM_SUPPLY("PLL", SND_SOC_NOPM, 0, 0, NULL, 0),
-       SND_SOC_DAPM_SUPPLY("NDivider", SND_SOC_NOPM, 0, 0, NULL, 0),
+       SND_SOC_DAPM_SUPPLY("Stereo PLL", SND_SOC_NOPM, 0, 0, NULL, 0),
+       SND_SOC_DAPM_SUPPLY("Stereo NDivider", SND_SOC_NOPM, 0, 0, NULL, 0),
 
-       SND_SOC_DAPM_OUTPUT("OUT")
+       SND_SOC_DAPM_OUTPUT("Stereo OUT")
 };
 
 static const struct snd_soc_dapm_route tas2555_audio_map[] = {
-       {"DAC", NULL, "ASI1"},
-       {"DAC", NULL, "ASI2"},
-       {"DAC", NULL, "ASIM"},
-       {"ClassD", NULL, "DAC"},
-       {"OUT", NULL, "ClassD"},
-       {"DAC", NULL, "PLL"},
-       {"DAC", NULL, "NDivider"},
+       {"Stereo DAC", NULL, "Stereo ASI1"},
+       {"Stereo DAC", NULL, "Stereo ASI2"},
+       {"Stereo DAC", NULL, "Stereo ASIM"},
+       {"Stereo ClassD", NULL, "Stereo DAC"},
+       {"Stereo OUT", NULL, "Stereo ClassD"},
+       {"Stereo DAC", NULL, "Stereo PLL"},
+       {"Stereo DAC", NULL, "Stereo NDivider"},
 };
 
 static int tas2555_startup(struct snd_pcm_substream *substream,
@@ -473,19 +473,19 @@ static int tas2555_rdac_gain_put(struct snd_kcontrol *pKcontrol,
 }
 
 static const struct snd_kcontrol_new tas2555_snd_controls[] = {
-       SOC_SINGLE_EXT("LDAC Playback Volume", SND_SOC_NOPM, 0, 0x0f, 0, 
+       SOC_SINGLE_EXT("Stereo LDAC Playback Volume", SND_SOC_NOPM, 0, 0x0f, 0, 
                tas2555_ldac_gain_get, tas2555_ldac_gain_put),
-       SOC_SINGLE_EXT("RDAC Playback Volume", SND_SOC_NOPM, 0, 0x0f, 0, 
+       SOC_SINGLE_EXT("Stereo RDAC Playback Volume", SND_SOC_NOPM, 0, 0x0f, 0, 
                tas2555_rdac_gain_get, tas2555_rdac_gain_put),          
-       SOC_SINGLE_EXT("PowerCtrl", SND_SOC_NOPM, 0, 0x0001, 0,
+       SOC_SINGLE_EXT("Stereo PowerCtrl", SND_SOC_NOPM, 0, 0x0001, 0,
                tas2555_power_ctrl_get, tas2555_power_ctrl_put),
-       SOC_SINGLE_EXT("Program", SND_SOC_NOPM, 0, 0x00FF, 0, tas2555_program_get,
+       SOC_SINGLE_EXT("Stereo Program", SND_SOC_NOPM, 0, 0x00FF, 0, tas2555_program_get,
                tas2555_program_put),
-       SOC_SINGLE_EXT("Configuration", SND_SOC_NOPM, 0, 0x00FF, 0,
+       SOC_SINGLE_EXT("Stereo Configuration", SND_SOC_NOPM, 0, 0x00FF, 0,
                tas2555_configuration_get, tas2555_configuration_put),
-       SOC_SINGLE_EXT("FS", SND_SOC_NOPM, 8000, 48000, 0,
+       SOC_SINGLE_EXT("Stereo FS", SND_SOC_NOPM, 8000, 48000, 0,
                tas2555_fs_get, tas2555_fs_put),
-       SOC_SINGLE_EXT("Calibration", SND_SOC_NOPM, 0, 0x00FF, 0,
+       SOC_SINGLE_EXT("Stereo Calibration", SND_SOC_NOPM, 0, 0x00FF, 0,
                tas2555_calibration_get, tas2555_calibration_put),
 };
 
@@ -519,10 +519,10 @@ static struct snd_soc_dai_ops tas2555_dai_ops = {
              SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
 static struct snd_soc_dai_driver tas2555_dai_driver[] = {
        {
-               .name = "tas2555 ASI1",
+               .name = "tas2555 Stereo ASI1",
                .id = 0,
                .playback = {
-                               .stream_name = "ASI1 Playback",
+                               .stream_name = "Stereo ASI1 Playback",
                                .channels_min = 2,
                                .channels_max = 2,
                                .rates = SNDRV_PCM_RATE_8000_192000,
@@ -532,10 +532,10 @@ static struct snd_soc_dai_driver tas2555_dai_driver[] = {
                .symmetric_rates = 1,
        },
        {
-               .name = "tas2555 ASI2",
+               .name = "tas2555 Stereo ASI2",
                .id = 1,
                .playback = {
-                               .stream_name = "ASI2 Playback",
+                               .stream_name = "Stereo ASI2 Playback",
                                .channels_min = 2,
                                .channels_max = 2,
                                .rates = SNDRV_PCM_RATE_8000_192000,
@@ -545,10 +545,10 @@ static struct snd_soc_dai_driver tas2555_dai_driver[] = {
                .symmetric_rates = 1,
        },
        {
-               .name = "tas2555 ASIM",
+               .name = "tas2555 Stereo ASIM",
                .id = 2,
                .playback = {
-                               .stream_name = "ASIM Playback",
+                               .stream_name = "Stereo ASIM Playback",
                                .channels_min = 2,
                                .channels_max = 2,
                                .rates = SNDRV_PCM_RATE_8000_192000,
@@ -580,6 +580,6 @@ int tas2555_deregister_codec(struct tas2555_priv *pTAS2555)
 }
 
 MODULE_AUTHOR("Texas Instruments Inc.");
-MODULE_DESCRIPTION("TAS2555 ALSA SOC Smart Amplifier driver");
+MODULE_DESCRIPTION("TAS2555 ALSA SOC Smart Amplifier Stereo driver");
 MODULE_LICENSE("GPLv2");
 #endif