summaryrefslogtreecommitdiff
path: root/cras
diff options
context:
space:
mode:
authorJohn Muir <muirj@google.com>2016-07-12 17:55:13 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-21 03:15:48 -0700
commit36fff79a4e508cfaa63e807d0f02a58c61e54711 (patch)
tree44caf00f24d3a36ef0d678de8ba5c24d99435002 /cras
parent3089a1acfbc21b35a548ec5bb2a45ed1bf87923a (diff)
downloadadhd-36fff79a4e508cfaa63e807d0f02a58c61e54711.tar.gz
CRAS: Remove device index test in cras_alsa_jack.
There used to be limits in ALSA for device number values. Now this is not the case, and the card number is unlikely to be wrong coming into CRAS. Remove the test. BUG=None TEST=CRAS can use a device with index larger than 32. Change-Id: I9c41b8ec477a285d781ac3c94b4f65468707bafb Reviewed-on: https://chromium-review.googlesource.com/360028 Commit-Ready: Dan Shi <dshi@google.com> Tested-by: John Muir <muirj@google.com> Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'cras')
-rw-r--r--cras/src/server/cras_alsa_jack.c7
-rw-r--r--cras/src/tests/alsa_jack_unittest.cc15
2 files changed, 0 insertions, 22 deletions
diff --git a/cras/src/server/cras_alsa_jack.c b/cras/src/server/cras_alsa_jack.c
index 66b7790b..6869b0b9 100644
--- a/cras/src/server/cras_alsa_jack.c
+++ b/cras/src/server/cras_alsa_jack.c
@@ -1159,13 +1159,6 @@ struct cras_alsa_jack_list *cras_alsa_jack_list_create(
if (direction != CRAS_STREAM_INPUT && direction != CRAS_STREAM_OUTPUT)
return NULL;
- /* Enforce alsa limits. */
- if (card_index >= 32 || device_index >= 32) {
- syslog(LOG_ERR, "Jack List: Invalid card/dev %u/%u",
- card_index, device_index);
- return NULL;
- }
-
jack_list = (struct cras_alsa_jack_list *)calloc(1, sizeof(*jack_list));
if (jack_list == NULL)
return NULL;
diff --git a/cras/src/tests/alsa_jack_unittest.cc b/cras/src/tests/alsa_jack_unittest.cc
index b0d0dfd7..14085f20 100644
--- a/cras/src/tests/alsa_jack_unittest.cc
+++ b/cras/src/tests/alsa_jack_unittest.cc
@@ -156,21 +156,6 @@ static void fake_jack_cb(const struct cras_alsa_jack *jack,
ucm_set_enabled_value);
}
-TEST(AlsaJacks, CreateFailInvalidParams) {
- EXPECT_EQ(NULL, cras_alsa_jack_list_create(32, "c1", 0, 1,
- fake_mixer,
- NULL, fake_hctl,
- CRAS_STREAM_OUTPUT,
- fake_jack_cb,
- fake_jack_cb_arg));
- EXPECT_EQ(NULL, cras_alsa_jack_list_create(0, "c1", 32, 1,
- fake_mixer,
- NULL, fake_hctl,
- CRAS_STREAM_OUTPUT,
- fake_jack_cb,
- fake_jack_cb_arg));
-}
-
TEST(AlsaJacks, CreateNullHctl) {
struct cras_alsa_jack_list *jack_list;
ResetStubData();