77#include <linux/string.h>
88#include <linux/slab.h>
99
10+ #if IS_ENABLED (CONFIG_DRM_APPLE_AUDIO )
1011#include <sound/pcm.h> // for sound format masks
12+ #endif
1113
1214#include "parser.h"
1315#include "trace.h"
@@ -119,6 +121,7 @@ static int skip(struct dcp_parse_ctx *handle)
119121 }
120122}
121123
124+ #if IS_ENABLED (CONFIG_DRM_APPLE_AUDIO )
122125static int skip_pair (struct dcp_parse_ctx * handle )
123126{
124127 int ret ;
@@ -151,6 +154,7 @@ static bool consume_string(struct dcp_parse_ctx *ctx, const char *specimen)
151154 skip (ctx );
152155 return true;
153156}
157+ #endif
154158
155159/* Caller must free the result */
156160static char * parse_string (struct dcp_parse_ctx * handle )
@@ -201,6 +205,7 @@ static int parse_bool(struct dcp_parse_ctx *handle, bool *b)
201205 return 0 ;
202206}
203207
208+ #if IS_ENABLED (CONFIG_DRM_APPLE_AUDIO )
204209static int parse_blob (struct dcp_parse_ctx * handle , size_t size , u8 const * * blob )
205210{
206211 const struct dcp_parse_tag * tag = parse_tag_of_type (handle , DCP_TYPE_BLOB );
@@ -220,6 +225,7 @@ static int parse_blob(struct dcp_parse_ctx *handle, size_t size, u8 const **blob
220225 * blob = out ;
221226 return 0 ;
222227}
228+ #endif
223229
224230struct iterator {
225231 struct dcp_parse_ctx * handle ;
@@ -680,6 +686,7 @@ int parse_epic_service_init(struct dcp_parse_ctx *handle, const char **name,
680686 return ret ;
681687}
682688
689+ #if IS_ENABLED (CONFIG_DRM_APPLE_AUDIO )
683690static int parse_sample_rate_bit (struct dcp_parse_ctx * handle , unsigned int * ratebit )
684691{
685692 s64 rate ;
@@ -983,6 +990,7 @@ int parse_sound_mode(struct dcp_parse_ctx *handle,
983990 return 0 ;
984991}
985992EXPORT_SYMBOL_GPL (parse_sound_mode );
993+ #endif
986994
987995int parse_system_log_mnits (struct dcp_parse_ctx * handle , struct dcp_system_ev_mnits * entry )
988996{
0 commit comments