Skip to contentSkip to conversation

Audio routing in the tlv320aic3104

DISCUSSION Rick Mann 2 participants 4 messages Oct 7, 2015

lore
Share & tools
lore

Rick Mann

author
#0 lore raw

I've managed to get a hacky, fragile config working, in the sense that it sends my tlv320aic3104 samples from speaker-test, and the clocks and data all look good on the oscilloscope, and it ping-pongs between the left and right channel.

But it's outputting the signal on the HPLOUT/HPROUT pins, not the L&R Line Out pins.

My DTS has this:

    fragment@3 {
        target = <&ocp>;
        __overlay__ {
            sound {
                compatible = "ti,da830-evm-audio";
                ti,model = "DA830 EVM";
                ti,audio-codec = <&tlv320aic3x>;
                ti,mcasp-controller = <&mcasp0>;
                ti,codec-clock-rate = <12000000>;
                ti,audio-routing =
                    "Line Out",             "LLOUT",
                    "Line Out",             "RLOUT";
            };
        };
    };

The original had:

	"Headphone Jack",       "HPLOUT",
	"Headphone Jack",       "HPROUT",
	"LINE1L",               "Line In",
	"LINE1R",               "Line In";

I also have an asound.state file I got from the Audio Cape:

https://raw.githubusercontent.com/CircuitCo/BeagleBone-Audio/files/asound.state

I don't really know how to interpret that file. One resource online said it held the current state of the system. I guess that suggests I should play with amixer. But how does the DTS routing come into play?

Thanks,

Signature · 2 lines
Rick Mann
[email protected]
#1 lore raw

Sent from my iPhone

Quoted 31 lines · Rick Mann

I've managed to get a hacky, fragile config working, in the sense that it sends my tlv320aic3104 samples from speaker-test, and the clocks and data all look good on the oscilloscope, and it ping-pongs between the left and right channel.

But it's outputting the signal on the HPLOUT/HPROUT pins, not the L&R Line Out pins.

My DTS has this:

   fragment@3 {
       target = <&ocp>;
       __overlay__ {
           sound {
               compatible = "ti,da830-evm-audio";
               ti,model = "DA830 EVM";
               ti,audio-codec = <&tlv320aic3x>;
               ti,mcasp-controller = <&mcasp0>;
               ti,codec-clock-rate = <12000000>;
               ti,audio-routing =
                   "Line Out",             "LLOUT",
                   "Line Out",             "RLOUT";
           };
       };
   };

The original had:

   "Headphone Jack",       "HPLOUT",
   "Headphone Jack",       "HPROUT",
   "LINE1L",               "Line In",
   "LINE1R",               "Line In";
Quoted 8 lines

I also have an asound.state file I got from the Audio Cape:

https://raw.githubusercontent.com/CircuitCo/BeagleBone-Audio/files/asound.state

I don't really know how to interpret that file. One resource online said it held the current state of the system. I guess that suggests I should play with amixer. But how does the DTS routing come into play?

Thanks,

Check for the routing in the davinci-evm.c file. It has other routes, I kind of recall it says some outputs are not connected. You might have to edit routs there too.

Quoted 11 lines
Signature · 9 lines
-- 
Rick Mann
[email protected]


_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
author
#2 lore raw
Quoted 40 lines · Caleb Crome

Sent from my iPhone

Quoted 33 lines · Rick Mann

I've managed to get a hacky, fragile config working, in the sense that it sends my tlv320aic3104 samples from speaker-test, and the clocks and data all look good on the oscilloscope, and it ping-pongs between the left and right channel.

But it's outputting the signal on the HPLOUT/HPROUT pins, not the L&R Line Out pins.

My DTS has this:

  fragment@3 {
      target = <&ocp>;
      __overlay__ {
          sound {
              compatible = "ti,da830-evm-audio";
              ti,model = "DA830 EVM";
              ti,audio-codec = <&tlv320aic3x>;
              ti,mcasp-controller = <&mcasp0>;
              ti,codec-clock-rate = <12000000>;
              ti,audio-routing =
                  "Line Out",             "LLOUT",
                  "Line Out",             "RLOUT";
          };
      };
  };

The original had:

  "Headphone Jack",       "HPLOUT",
  "Headphone Jack",       "HPROUT",
  "LINE1L",               "Line In",
  "LINE1R",               "Line In";

I also have an asound.state file I got from the Audio Cape:

Quoted 7 lines
Quoted 5 lines

https://raw.githubusercontent.com/CircuitCo/BeagleBone-Audio/files/asound.state

I don't really know how to interpret that file. One resource online said it held the current state of the system. I guess that suggests I should play with amixer. But how does the DTS routing come into play?

Thanks,

Check for the routing in the davinci-evm.c file. It has other routes, I kind of recall it says some outputs are not connected. You might have to edit routs there too.

Actually I was able to use amixer to switch the DAC muxes to the right setting, and the signal routed to the right place. I think it's the first time in three weeks that the first thing I tried actually worked as expected.

But I had hoped ALSA would enable only that route given the DTS; perhaps it's the asound.state file I downloaded that forced its hand the wrong way; I'll try that experiment later.

At least now I can populate the remaining parts on the board to see if they work, too.

I still am far from complete with the Linux config (need to get it working in 4.x, need to get my enable GPIOs working automatically, etc.), but I can finally make real progress.

Thanks!

#3 lore raw

Woo!

Quoted 79 lines · Rick Mann
Quoted 10 lines · Caleb Crome

Sent from my iPhone

Quoted 3 lines · Rick Mann

I've managed to get a hacky, fragile config working, in the sense that

it sends my tlv320aic3104 samples from speaker-test, and the clocks and data all look good on the oscilloscope, and it ping-pongs between the left and right channel.

Quoted 2 lines
Quoted 2 lines

But it's outputting the signal on the HPLOUT/HPROUT pins, not the L&R

Line Out pins.

Quoted 21 lines
Quoted 21 lines

My DTS has this:

  fragment@3 {
      target = <&ocp>;
      __overlay__ {
          sound {
              compatible = "ti,da830-evm-audio";
              ti,model = "DA830 EVM";
              ti,audio-codec = <&tlv320aic3x>;
              ti,mcasp-controller = <&mcasp0>;
              ti,codec-clock-rate = <12000000>;
              ti,audio-routing =
                  "Line Out",             "LLOUT",
                  "Line Out",             "RLOUT";
          };
      };
  };

The original had:

Quoted 8 lines
Quoted 8 lines
  "Headphone Jack",       "HPLOUT",
  "Headphone Jack",       "HPROUT",
  "LINE1L",               "Line In",
  "LINE1R",               "Line In";

I also have an asound.state file I got from the Audio Cape:

https://raw.githubusercontent.com/CircuitCo/BeagleBone-Audio/files/asound.state

Quoted 2 lines
Quoted 2 lines

I don't really know how to interpret that file. One resource online

said it held the current state of the system. I guess that suggests I should play with amixer. But how does the DTS routing come into play?

Quoted 4 lines
Quoted 2 lines

Thanks,

Check for the routing in the davinci-evm.c file. It has other routes,

I kind of recall it says some outputs are not connected. You might have
to edit routs there too.

Actually I was able to use amixer to switch the DAC muxes to the right setting, and the signal routed to the right place. I think it's the first time in three weeks that the first thing I tried actually worked as expected.

But I had hoped ALSA would enable only that route given the DTS; perhaps it's the asound.state file I downloaded that forced its hand the wrong way; I'll try that experiment later.

At least now I can populate the remaining parts on the board to see if they work, too.

I still am far from complete with the Linux config (need to get it working in 4.x, need to get my enable GPIOs working automatically, etc.), but I can finally make real progress.

Thanks!
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel