Effect AIDL: Add back some effect parameters.

Bug: 258124419
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I4daeb8cec2a0c0e33a55a9ffaea3e78b362bc949
diff --git a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
index a36cfe0..51fe4ea 100644
--- a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
+++ b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.cpp
@@ -90,10 +90,15 @@
     switch (tag) {
         case NoiseSuppression::level: {
             RETURN_IF(mContext->setLevel(param.get<NoiseSuppression::level>()) != RetCode::SUCCESS,
-                      EX_ILLEGAL_ARGUMENT, "levelSupported");
+                      EX_ILLEGAL_ARGUMENT, "levelNotSupported");
             return ndk::ScopedAStatus::ok();
         }
-        default: {
+        case NoiseSuppression::type: {
+            RETURN_IF(mContext->setType(param.get<NoiseSuppression::type>()) != RetCode::SUCCESS,
+                      EX_ILLEGAL_ARGUMENT, "typeNotSupported");
+            return ndk::ScopedAStatus::ok();
+        }
+        case NoiseSuppression::vendor: {
             LOG(ERROR) << __func__ << " unsupported tag: " << toString(tag);
             return ndk::ScopedAStatus::fromExceptionCodeWithMessage(
                     EX_ILLEGAL_ARGUMENT, "NoiseSuppressionTagNotSupported");
@@ -111,10 +116,11 @@
         case NoiseSuppression::Id::commonTag:
             return getParameterNoiseSuppression(specificId.get<NoiseSuppression::Id::commonTag>(),
                                                 specific);
-        default:
+        case NoiseSuppression::Id::vendorExtensionTag: {
             LOG(ERROR) << __func__ << " unsupported tag: " << toString(tag);
             return ndk::ScopedAStatus::fromExceptionCodeWithMessage(
                     EX_ILLEGAL_ARGUMENT, "NoiseSuppressionTagNotSupported");
+        }
     }
 }
 
@@ -127,7 +133,11 @@
             param.set<NoiseSuppression::level>(mContext->getLevel());
             break;
         }
-        default: {
+        case NoiseSuppression::type: {
+            param.set<NoiseSuppression::type>(mContext->getType());
+            break;
+        }
+        case NoiseSuppression::vendor: {
             LOG(ERROR) << __func__ << " unsupported tag: " << toString(tag);
             return ndk::ScopedAStatus::fromExceptionCodeWithMessage(
                     EX_ILLEGAL_ARGUMENT, "NoiseSuppressionTagNotSupported");
@@ -177,4 +187,9 @@
     return mLevel;
 }
 
+RetCode NoiseSuppressionSwContext::setType(NoiseSuppression::Type type) {
+    mType = type;
+    return RetCode::SUCCESS;
+}
+
 }  // namespace aidl::android::hardware::audio::effect
diff --git a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.h b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.h
index f39d8e5..a851e38 100644
--- a/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.h
+++ b/audio/aidl/default/noiseSuppression/NoiseSuppressionSw.h
@@ -35,9 +35,12 @@
 
     RetCode setLevel(NoiseSuppression::Level level);
     NoiseSuppression::Level getLevel();
+    RetCode setType(NoiseSuppression::Type type);
+    NoiseSuppression::Type getType() { return mType; }
 
   private:
     NoiseSuppression::Level mLevel = NoiseSuppression::Level::LOW;
+    NoiseSuppression::Type mType = NoiseSuppression::Type::SINGLE_CHANNEL;
 };
 
 class NoiseSuppressionSw final : public EffectImpl {