summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorMohan Kumar <mkumard@nvidia.com>2017-06-12 03:59:40 -0400
committerSameer Pujar <spujar@nvidia.com>2017-08-07 05:31:00 -0400
commita570ab5cd3aa4d6e39773557db8d6e742426fa9f (patch)
tree3ce30f02a309e349266b4370f8c4469f17ed7674 /sound/pci/hda
parentfd6cb2bc5fbd8df709f969d0ea6ca4d1a611f267 (diff)
ALSA: hda: Program STRIPE CTL bit
For Multiple SOR usecases, need to program Stripe Control bit field to support the required outbound bandwidth for e.g 192Khz,24bit,8ch on all SOR needs stripe to be increased to 2/4 for increasing the bw for the outbound streams. Also as per HDA spec no.of stripes chosen based on below criteria For sample rate > 48Khz (no.of channels * bits_per_samples *(rate/48000))/stripe >=8 For Sample rate <= 48Khz (no.of channels * bits_per_samples)/stripe >= 8 Bug 200317644 Change-Id: I1627a668c3280d3565a805b32c683f42983d391c Signed-off-by: Mohan Kumar <mkumard@nvidia.com> Reviewed-on: https://git-master/r/1500324 (cherry picked from commit 27fce94e169a08b0f25892bad5c5b47af09d33d4) Reviewed-on: https://git-master/r/1510177 GVS: Gerrit_Virtual_Submit Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_tegra.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 1c1402491..e256b6a8a 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -81,6 +81,8 @@ static struct of_device_id tegra_disb_pd[] = {
81#define NUM_CAPTURE_SD 1 81#define NUM_CAPTURE_SD 1
82#define NUM_PLAYBACK_SD 1 82#define NUM_PLAYBACK_SD 1
83 83
84#define MAX_SDO_LINES 4
85
84struct hda_tegra { 86struct hda_tegra {
85 struct azx chip; 87 struct azx chip;
86 struct device *dev; 88 struct device *dev;
@@ -91,6 +93,7 @@ struct hda_tegra {
91 void __iomem *regs; 93 void __iomem *regs;
92 struct work_struct probe_work; 94 struct work_struct probe_work;
93 bool is_power_on; 95 bool is_power_on;
96 unsigned int max_sdo_lines;
94}; 97};
95 98
96#ifdef CONFIG_PM 99#ifdef CONFIG_PM
@@ -450,6 +453,7 @@ static int hda_tegra_init_chip(struct azx *chip, struct platform_device *pdev)
450 453
451 bus->remap_addr = hda->regs + HDA_BAR0; 454 bus->remap_addr = hda->regs + HDA_BAR0;
452 bus->addr = res->start + HDA_BAR0; 455 bus->addr = res->start + HDA_BAR0;
456 bus->max_sdo_lines = hda->max_sdo_lines;
453 457
454 hda_tegra_init(hda); 458 hda_tegra_init(hda);
455 459
@@ -600,6 +604,13 @@ static int hda_tegra_probe(struct platform_device *pdev)
600 chip = &hda->chip; 604 chip = &hda->chip;
601 hda->is_power_on = false; 605 hda->is_power_on = false;
602 606
607 if (of_property_read_u32(pdev->dev.of_node,
608 "max-sdo-lines", &hda->max_sdo_lines) < 0)
609 hda->max_sdo_lines = 1;
610
611 if (hda->max_sdo_lines > MAX_SDO_LINES)
612 hda->max_sdo_lines = MAX_SDO_LINES;
613
603 hda->partition_id = tegra_pd_get_powergate_id(tegra_disb_pd); 614 hda->partition_id = tegra_pd_get_powergate_id(tegra_disb_pd);
604 if (hda->partition_id < 0) { 615 if (hda->partition_id < 0) {
605 dev_err(&pdev->dev, "Failed to get hda power domain id\n"); 616 dev_err(&pdev->dev, "Failed to get hda power domain id\n");